Azure Cosmos DB is a globally distributed, low-latency, high throughput databases services. Azure Cosmos DB provides global distribution, which means you can scale and distribute it across different Azure regions. This enables you to have your data replicated over as many as datacenter per your need, moreover control and access your replicated data seamlessly. Setting up the Geo-Replication is very easy and can be done in a couple of clicks from the Azure Portal.
Setting up Geo-Replication
Follow these steps to set up the Geo-Replication
- From the Azure Portal, Open the Azure Cosmos DB database resource
- Select “Replicate data globally” under the “Settings” option.
In the initial state, the Global Distribution map will highlight the Write Region, which is the origin of the Cosmos DB database.
Now you can add additional region by simply clicking on the regions you want to replicate to on the map or Just clicking on “Add New Region” button which is available under the “Read Regions” section.
Click on Save and you are done.
The overall process will take a while and it will depend on the number of regions you selected for your data to be replicated.
That’s all! Once the Geo-Replication is done, you can go back and check all your regions on the Map, further you can add or remove any other regions as per your need.
Now, You can also specify the priorities for your data center regions to decide which data center to go first for failover in case of a disaster, we will cover up that in our next post.
You may read more about global data distribution of Azure Cosmos DB over here.
Hope this helps.