Skip to content

Commit 1bca05d

Browse files
Merge pull request #286492 from mrm9084/GeoReplicationPython
Geo replication python
2 parents 1b86009 + 1108f82 commit 1bca05d

File tree

1 file changed

+27
-7
lines changed

1 file changed

+27
-7
lines changed

articles/azure-app-configuration/howto-geo-replication.md

Lines changed: 27 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ ms.service: azure-app-configuration
77
ms.devlang: csharp
88
# ms.devlang: csharp, java
99
ms.topic: how-to
10-
ms.date: 05/24/2024
10+
ms.date: 09/09/2024
1111
ms.author: mametcal
1212
ms.custom: devx-track-azurecli
1313

@@ -16,7 +16,7 @@ ms.custom: devx-track-azurecli
1616

1717
# Enable geo-replication
1818

19-
This article covers replication of Azure App Configuration stores. You'll learn about how to create, use and delete a replica in your configuration store.
19+
This article covers replication of Azure App Configuration stores. You learn about how to create, use, and delete a replica in your configuration store.
2020

2121
To learn more about the concept of geo-replication, see [Geo-replication in Azure App Configuration](./concept-geo-replication.md).
2222

@@ -90,7 +90,7 @@ To delete a replica in the portal, follow the steps below.
9090

9191
## Automatic replica discovery
9292

93-
The App Configuration providers can automatically discover any additional replicas from a given App Configuration endpoint and attempt to connect to them. This feature allows you to benefit from geo-replication without having to change your code or redeploy your application. This means you can enable geo-replication or add extra replicas even after your application has been deployed.
93+
The App Configuration providers can automatically discover any replicas from a given App Configuration endpoint and attempt to connect to them. This feature allows you to benefit from geo-replication without having to change your code or redeploy your application. This means you can enable geo-replication or add extra replicas even after your application has been deployed.
9494

9595
Automatic replica discovery is enabled by default, but you can refer to the following sample code to disable it (not recommended).
9696

@@ -147,13 +147,25 @@ spec:
147147
> [!NOTE]
148148
> The automatic replica discovery and failover support is available if you use version **1.3.0** or later of [Azure App Configuration Kubernetes Provider](./quickstart-azure-kubernetes-service.md).
149149
150+
### [Python](#tab/python)
151+
152+
Specify the `replica_discovery_enabled` property when loading the configuration store and set it to `False`.
153+
154+
155+
```python
156+
config = load(endpoint=endpoint, credential=credential, replica_discovery_enabled=False)
157+
```
158+
159+
> [!NOTE]
160+
> The automatic replica discovery support is available if you use version **1.3.0** or later.
161+
150162
---
151163

152164
## Scale and failover with replicas
153165

154166
Each replica you create has its dedicated endpoint. If your application resides in multiple geo-locations, you can update each deployment of your application in a location to connect to the replica closer to that location, which helps minimize the network latency between your application and App Configuration. Since each replica has its separate request quota, this setup also helps the scalability of your application while it grows to a multi-region distributed service.
155167

156-
When geo-replication is enabled, and if one replica isn't accessible, you can let your application failover to another replica for improved resiliency. App Configuration providers have built-in failover support through user provided replicas as well as additional automatically discovered replicas. You can provide a list of your replica endpoints in the order of the most preferred to the least preferred endpoint. When the current endpoint isn't accessible, the provider will fail over to a less preferred endpoint, but it will try to connect to the more preferred endpoints from time to time. If all user provided replicas are not accessible, the automatically discovered replicas will be randomly selected and used. When a more preferred endpoint becomes available, the provider will switch to it for future requests.
168+
When geo-replication is enabled, and if one replica isn't accessible, you can let your application failover to another replica for improved resiliency. App Configuration providers have built-in failover support through user provided replicas and/or additional automatically discovered replicas. You can provide a list of your replica endpoints in the order of the most preferred to the least preferred endpoint. When the current endpoint isn't accessible, the provider will fail over to a less preferred endpoint, but it tries to connect to the more preferred endpoints from time to time. If all user provided replicas aren't accessible, the automatically discovered replicas will be randomly selected and used. When a more preferred endpoint becomes available, the provider will switch to it for future requests.
157169

158170
Assuming you have an application using Azure App Configuration, you can update it as the following sample code to take advantage of the failover feature. You can either provide a list of endpoints for Microsoft Entra authentication or a list of connection strings for access key-based authentication.
159171

@@ -227,7 +239,11 @@ spring.cloud.azure.appconfiguration.stores[0].connection-strings[1]="${SECOND_RE
227239

228240
### [Kubernetes](#tab/kubernetes)
229241

230-
The Azure App Configuration Kubernetes Provider supports failover with automatically discovered replicas by default, as long as automatic replica discovery is not disabled. It does not support or require user-provided replicas.
242+
The Azure App Configuration Kubernetes Provider supports failover with automatically discovered replicas by default, as long as automatic replica discovery isn't disabled. It doesn't support or require user-provided replicas.
243+
244+
### [Python](#tab/python)
245+
246+
The Azure App Configuration Python Provider supports failover with automatically discovered replicas by default, as long as automatic replica discovery isn't disabled. It doesn't support or require user-provided replicas.
231247

232248
---
233249

@@ -266,11 +282,15 @@ configurationBuilder.AddAzureAppConfiguration(options =>
266282

267283
### [Java Spring](#tab/spring)
268284

269-
This feature is not yet supported in the Azure App Configuration Java Spring Provider.
285+
This feature isn't yet supported in the Azure App Configuration Java Spring Provider.
270286

271287
### [Kubernetes](#tab/kubernetes)
272288

273-
This feature is not yet supported in the Azure App Configuration Kubernetes Provider.
289+
This feature isn't yet supported in the Azure App Configuration Kubernetes Provider.
290+
291+
### [Python](#tab/python)
292+
293+
This feature isn't yet supported in the Azure App Configuration Python Provider.
274294

275295
---
276296

0 commit comments

Comments
 (0)