In the previous post, we discussed setting up global replication of Azure Cosmos DB database using the Azure portal. Priorities of data center regions can be specified after Geo-Replication configuration. This is to decide which data center to go first for failover in case of a disaster. Azure Cosmos DB enables us to tag a priority to every data center regions.
Setting up Failover Priorities for Azure Cosmos DB
first of all, navigate to the Geo-Replication window to configure the failover priorities. Select the “Automatic Failover” option and Turned it on. And, then drag and drop the region in reading the section to change your priorities.
In case of an outage, Azure Cosmos DB ensure the automatic failover is on. And, the sequence occurs in the priority of the order that we have specified.
This is very easy to configure & setup on the Azure Portal. You can also manage this programmatically with the help of Cosmos DB Resource Provider – Database Accounts – Failover Priority Change
The Failover Priorities are set for the read regions. In case of an outage, Azure Cosmos DB ensure the failover based on the priorities specified.
You can also setup the Manual Failover ( Select a Read Region to become the new Write Region). You can achieve that by manually changing the current write region to any of the replicated read regions. In this case, select the “Manual Failover” option. And, then select the regions for failover from one of the read region.
Read more about Azure Cosmos DB Failover from here.
Hope this helps.