Let’s use the Azure portal to build a globally distributed Cosmos DB. Before doing this, why would you ? what are the benefits?
- Regional based. By this I mean that if you design correctly you can serve your customers via read/write access to the nearest replica (based on location) improving the performance and experience.
- Obviously an availability advantage with the support for automatic failover.
- A side benefit is that it is very easy to setup via the portal (couple of clicks – turnkey).
Reading how this was designed by Microsoft made for fascinating reading – here is the link (https://docs.microsoft.com/en-us/azure/cosmos-db/global-dist-under-the-hood)
First step is to create a Cosmos DB account.
Take note of the information – “Create a globally distributed, multi-model, fully managed database using API of your choice. Or try it for free, up to 20k RU/s, for 30 days with unlimited renewal. “
Create the account with the relevant details around what resource group you want this in etc. Key bit here is to enable the Geo-redundancy option at the bottom.
Click create – take a copy of the template too (if you want to use PowerShell to deploy it again).
Once deployment has completed under settings you will see the replicate data globally option. Using the map click the regions you require, here I add another 2 locations being east US and west US.
This process will take some time.
Pingback: Dew Drop – June 19, 2019 (#2982) | Morning Dew
Pingback: Last Week Reading (2019-06-23) | SQLPlayer