Skip to content

Commit 772f52e

Browse files
committed
Add config provider failover instructions
1 parent 8cda41f commit 772f52e

File tree

1 file changed

+34
-1
lines changed

1 file changed

+34
-1
lines changed

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

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ ms.custom: devx-track-azurecli
1515

1616
# Enable geo-replication (Preview)
1717

18-
This article covers replication of Azure App Configuration stores. You'll learn about how to create and delete a replica in your configuration store.
18+
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.
1919

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

@@ -84,6 +84,39 @@ To delete a replica in the portal, follow the steps below.
8484
8585
--- -->
8686

87+
## Use replicas
88+
89+
Each replica you create has its dedicated endpoint. If your application resides in multiple geolocations, 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.
90+
91+
When geo-replication is enabled, and if one replica is not accessible, you can let your application failover to another replica for improved resiliency. App Configuration provider libraries have built-in failover support. The provider library accepts multiple endpoints. You can provide a list of your replica endpoints in the order of how you prefer your application to connect, from the most to the least. When one endpoint is not accessible, the provider library will failover to a less preferred endpoint, but it will try to connect to the more preferred endpoints from time to time. When a more preferred endpoint becomes available, it will switch to it for future requests. You can update your application to take advantage of this failover support.
92+
93+
<!-- ### [.NET](#tab/dotnet) -->
94+
95+
```csharp
96+
configurationBuilder.AddAzureAppConfiguration(options =>
97+
{
98+
// Provide an ordered list of replica endpoints and use AAD authentication
99+
options.Connect(new Uri[] {
100+
new Uri("https://<first-replica-endpoint>.azconfig.io"),
101+
new Uri("https://<second-replica-endpoint>.azconfig.io") },
102+
new DefaultAzureCredential());
103+
104+
// Other changes to options
105+
});
106+
```
107+
108+
> [!NOTE]
109+
> The failover support is availble in package `Microsoft.Extensions.Configuration.AzureAppConfiguration` version **5.3.0-preview** or later.
110+
111+
<!-- ### [Java Spring](#tab/spring)
112+
Placeholder for Java Spring instructions
113+
--- -->
114+
115+
The failover in the App Configuration provider occurs in the following conditions. It will not happen for client errors like authentication failures.
116+
- Service unavailable responses (HTTP status code 500 or above)
117+
- Network connectivity issues
118+
- Throttled requests (HTTP status code 429)
119+
87120
## Next steps
88121

89122
> [!div class="nextstepaction"]

0 commit comments

Comments
 (0)