Nota
L'accesso a questa pagina richiede l'autorizzazione. È possibile provare ad accedere o modificare le directory.
L'accesso a questa pagina richiede l'autorizzazione. È possibile provare a modificare le directory.
With zone redundancy, Azure Cosmos DB intelligently distributes the four replicas of your data across multiple availability zones. This ensures that, in the event of an outage in one zone, the account remains fully operational. In contrast, without zone redundancy, all replicas might be located in a single availability zone (we don't expose which), leading to potential downtime if that specific zone experiences an issue. Enabling zone redundancy is a great way to increase resilience of your Cosmos DB database without introducing additional application complexities, affecting performance, or even incurring additional costs, if autoscale is also used. For more information, see Reliability in Azure Cosmos DB - Resilience to availability zone failures.
Enabling zone redundancy isn't an account-wide choice. A single Cosmos DB account can span an arbitrary number of Azure regions, each of which can independently be configured to enable zone redundancy. Some regions don't provide availability zone support. This is important, as some regions don't yet support availability zones, but adding them to an Azure Cosmos DB account doesn't prevent enabling zone redundancy in other regions configured for that account.
Note
If you receive an error during deployment indicating the region is constrained and you can't enable zone redundancy, open a support request to request capacity in the region's zones.
Prerequisites
Before configuring zone redundancy, review the requirements and details listed in Reliability in Azure Cosmos DB - Resilience to availability zone failures.
Create a new zone-redundant account
When you create a new Azure Cosmos DB account, you can configure zone redundancy on one or more regions by using these instructions:
- Azure portal. When deploying, set the Availability Zones setting to Enabled.
- Azure CLI. When setting the
--locationsargument, setisZoneRedundant=Truefor the regions you want to make zone-redundant. - Bicep. Update the
isZoneRedundantproperty totruefor the regions you want to make zone-redundant. - Azure Resource Manager templates. Update the
isZoneRedundantproperty totruefor the regions you want to make zone-redundant.
Enable zone redundancy on an existing account
You can't enable zone redundancy in a region that has already been added to your account, so you need to remove that region and add it again with zone redundancy enabled. To avoid any service disruption, you add a temporary region and fail over to it until the zone redundancy configuration is complete.
Important
When you follow the process described in this article, a small amount of write unavailability (a few seconds) occurs when adding and removing the secondary region, as the system deliberately stops writes in order to check consistency between regions.
Additionally, you incur cost for the secondary region and for the data replication. Zone-redundant accounts are charged at a different rate. For more information, see Azure Cosmos DB pricing.
Follow the steps below to enable zone redundancy for your account in select regions.
Add a temporary region to your database account by following steps in Add region to your database account.
Wait for the newly added region to be marked as Available.
When you add a new region to your account, Azure replicates and commits all data into the new region before marking the region as available. The amount of time this operation takes depends upon how much stored data is in the account.
If your Azure Cosmos DB account is configured with multi-region writes, skip to the next step.
Otherwise, change the account's write region to the newly added temporary region. Follow the steps in Set failover priorities for your Azure Cosmos DB account.
Remove the region for which you would like to enable zone redundancy by following steps in Remove region to your database account.
Add back the region with zone redundancy enabled:
- Add region to your database account.
- Find the newly added region in the Write region column, and enable Availability Zone for that region.
- Select Save.
Wait for the newly added region to be marked as Available.
Change the account's write region to the newly zone-redundant region. Following the steps in Set failover priorities for your Azure Cosmos DB account.
Remove the temporary region by following steps in Remove region to your database account.