Skip to content

Commit 3cef393

Browse files
authored
Merge pull request #235284 from avanigupta/user/avanigupta/updateBcdrDoc
Update BCDR doc with Geo-Replication
2 parents 9c3d3dd + d04b126 commit 3cef393

9 files changed

+24
-342
lines changed

.openpublishing.publish.config.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -994,6 +994,7 @@
994994
".openpublishing.redirection.app-service.json",
995995
".openpublishing.redirection.azure-arc-data.json",
996996
".openpublishing.redirection.azure-attestation.json",
997+
".openpublishing.redirection.azure-app-configuration.json",
997998
".openpublishing.redirection.azure-australia.json",
998999
".openpublishing.redirection.azure-databricks.json",
9991000
".openpublishing.redirection.azure-hpc.json",
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"redirections": [
3+
{
4+
"source_path_from_root": "/articles/azure-app-configuration/howto-backup-config-store.md",
5+
"redirect_url": "/articles/azure-app-configuration/concept-geo-replication.md",
6+
"redirect_document_id": false
7+
}
8+
]
9+
}

articles/azure-app-configuration/TOC.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,8 +178,6 @@
178178
href: howto-leverage-json-content-type.md
179179
- name: Use Event Grid for data change notifications
180180
href: howto-app-configuration-event.md
181-
- name: Back up configuration stores automatically
182-
href: howto-backup-config-store.md
183181
- name: Use managed identities to access App Configuration
184182
href: howto-integrate-azure-managed-service-identity.md
185183
- name: Update to the New Spring Boot Library

articles/azure-app-configuration/concept-disaster-recovery.md

Lines changed: 13 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -1,92 +1,34 @@
11
---
22
title: Azure App Configuration resiliency and disaster recovery
3-
description: Lean how to implement resiliency and disaster recovery with Azure App Configuration.
4-
author: mcleanbyron
5-
ms.author: mcleans
3+
description: Learn how to implement resiliency and disaster recovery with Azure App Configuration.
4+
author: avanigupta
5+
ms.author: avgupta
66
ms.service: azure-app-configuration
77
ms.topic: conceptual
8-
ms.date: 07/09/2020
8+
ms.date: 04/20/2023
99
---
1010

1111
# Resiliency and disaster recovery
1212

13-
> [!IMPORTANT]
14-
> Azure App Configuration supports [geo-replication](./concept-geo-replication.md). You can enable replicas of your data across multiple locations for enhanced resiliency to regional outages. You can also leverage App Configuration provider libraries in your applications for [automatic failover](./howto-geo-replication.md#use-replicas). Utilizing geo-replication is the recommended solution for high availability.
13+
Azure App Configuration is a regional service. Each configuration store is created in a particular Azure region. A region-wide outage affects all stores in that region, and failover between regions isn't available by default. However, Azure App Configuration supports [geo-replication](./concept-geo-replication.md). You can enable replicas of your data across multiple locations for enhanced resiliency to regional outages. Utilizing geo-replication is the recommended solution for high availability.
1514

16-
Currently, Azure App Configuration is a regional service. Each configuration store is created in a particular Azure region. A region-wide outage affects all stores in that region. App Configuration doesn't offer automatic failover to another region. This article provides general guidance on how you can use multiple configuration stores across Azure regions to increase the geo-resiliency of your application.
15+
This article provides general guidance on how you can use multiple replicas across Azure regions to increase the geo-resiliency of your application.
1716

1817
## High-availability architecture
1918

20-
To realize cross-region redundancy, you need to create multiple App Configuration stores in different regions. With this setup, your application has at least one additional configuration store to fall back on if the primary store becomes inaccessible. The following diagram illustrates the topology between your application and its primary and secondary configuration stores:
19+
The original App Configuration store is also considered a replica, so to realize cross-region redundancy, you need to create at least one new replica in a different region. However, you can choose to create multiple App Configuration replicas in different regions based on your requirements. You may then utilize these replicas in your application in the order of your preference. With this setup, your application has at least one additional replica to fall back on if the primary replica becomes inaccessible.
2120

22-
![Geo-redundant stores](./media/geo-redundant-app-configuration-stores.png)
21+
The following diagram illustrates the topology between your application and two replicas:
2322

24-
Your application loads its configuration from both the primary and secondary stores in parallel. Doing this increases the chance of successfully getting the configuration data. You're responsible for keeping the data in both stores in sync. The following sections explain how you can build geo-resiliency into your application.
23+
:::image type="content" source="./media/geo-redundant-app-configuration-replicas.png" alt-text="Diagram of geo-redundant replicas." lightbox="./media/geo-redundant-app-configuration-replicas.png":::
2524

26-
## Failover between configuration stores
25+
Your application loads its configuration from the more preferred replica. If the preferred replica is not available, configuration is loaded from the less preferred replica. This increases the chance of successfully getting the configuration data. The data in both replicas is always in sync.
2726

28-
Technically, your application isn't executing a failover. It's attempting to retrieve the same set of configuration data from two App Configuration stores simultaneously. Arrange your code so that it loads from the secondary store first and then the primary store. This approach ensures that the configuration data in the primary store takes precedence whenever it's available. The following code snippet shows how you can implement this arrangement in .NET Core:
27+
## Failover between replicas
2928

30-
#### [.NET Core 2.x](#tab/core2x)
29+
If you want to leverage automatic failover between replicas, follow [these instructions](./howto-geo-replication.md#use-replicas) to set up failover using App Configuration provider libraries. This is the recommended approach for building resiliency in your application.
3130

32-
```csharp
33-
public static IWebHostBuilder CreateWebHostBuilder(string[] args) =>
34-
WebHost.CreateDefaultBuilder(args)
35-
.ConfigureAppConfiguration((hostingContext, config) =>
36-
{
37-
var settings = config.Build();
38-
config.AddAzureAppConfiguration(settings["ConnectionString_SecondaryStore"], optional: true)
39-
.AddAzureAppConfiguration(settings["ConnectionString_PrimaryStore"], optional: true);
40-
})
41-
.UseStartup<Startup>();
42-
43-
```
44-
45-
#### [.NET Core 3.x](#tab/core3x)
46-
47-
```csharp
48-
public static IHostBuilder CreateHostBuilder(string[] args) =>
49-
Host.CreateDefaultBuilder(args)
50-
.ConfigureWebHostDefaults(webBuilder =>
51-
webBuilder.ConfigureAppConfiguration((hostingContext, config) =>
52-
{
53-
var settings = config.Build();
54-
config.AddAzureAppConfiguration(settings["ConnectionString_SecondaryStore"], optional: true)
55-
.AddAzureAppConfiguration(settings["ConnectionString_PrimaryStore"], optional: true);
56-
})
57-
.UseStartup<Startup>());
58-
```
59-
---
60-
61-
Notice the `optional` parameter passed into the `AddAzureAppConfiguration` function. When set to `true`, this parameter prevents the application from failing to continue if the function can't load configuration data.
62-
63-
## Synchronization between configuration stores
64-
65-
It's important that your geo-redundant configuration stores all have the same set of data. There are two ways to achieve this:
66-
67-
### Backup manually using the Export function
68-
69-
You can use the **Export** function in App Configuration to copy data from the primary store to the secondary on demand. This function is available through both the Azure portal and the CLI.
70-
71-
From the Azure portal, you can push a change to another configuration store by following these steps.
72-
73-
1. Go to the **Import/Export** tab, and select **Export** > **App Configuration** > **Target** > **Select a resource**.
74-
75-
1. In the new blade that opens, specify the subscription, resource group, and resource name of your secondary store, then select **Apply**.
76-
77-
1. The UI is updated so that you can choose what configuration data you want to export to your secondary store. You can leave the default time value as is and set both **From label** and **Label** to the same value. Select **Apply**. Repeat this for all the labels in your primary store.
78-
79-
1. Repeat the previous steps whenever your configuration changes.
80-
81-
The export process can also be achieved using the Azure CLI. The following command shows how to export all configurations from the primary store to the secondary:
82-
83-
```azurecli
84-
az appconfig kv export --destination appconfig --name {PrimaryStore} --dest-name {SecondaryStore} --label * --preserve-labels -y
85-
```
86-
87-
### Backup automatically using Azure Functions
88-
89-
The backup process can be automated by using Azure Functions. It leverages the integration with Azure Event Grid in App Configuration. Once set up, App Configuration will publish events to Event Grid for any changes made to key-values in a configuration store. Thus, an Azure Functions app can listen to these events and backup data accordingly. For details, see the tutorial on [how to backup App Configuration stores automatically](./howto-backup-config-store.md).
31+
If the App Configuration provider libraries don't meet your requirements, you can still implement your own failover strategy. When geo-replication is enabled, and if one replica isn't accessible, you can let your application failover to another replica for accessing your configuration.
9032

9133
## Next steps
9234

0 commit comments

Comments
 (0)