3 ms·
Do they guarantee that if a write is done one region, when completed upon return, is available when read in another region?
by he0001 8y ago
Do they guarantee that if a write is done one region, when completed upon return, is available when read in another region?
- balakk 8y agoYes, CosmosDB lets you choose your preferred consistency level. https://docs.microsoft.com/en-us/azure/cosmos-db/consistency-levels https://docs.microsoft.com/en-us/azure/cosmos-db/consistency... The performance impact of different consistency levels are available here. https://docs.microsoft.com/en-us/azure/cosmos-db/consistency-levels-tradeoffs https://docs.microsoft.com/en-us/azure/cosmos-db/consistency... As you would expect, stronger consistency leads to lesser throughput levels.
- uluyol 8y agoI do not think so. When I last tried it they only allowed for "bounded staleness" consistency across regions despite supporting strong consistency within a region.
- dharmashuklaMS 8y agoHi, I am from the Azure Cosmos DB engineering team. All five consistency levels (strong, bounded staleness, session, consistent prefix, and eventual) are available for your Cosmos account, regardless of the number of regions it is associated with. To answer your specific question, yes, if you choose strong consistency, you will read the latest write in any of the regions associated with your Cosmos database. If you choose bounded staleness consistency, you can configure the number of versions (k) or time (t) up to which you are willing to tolerate the staleness for your reads in return for the write to get ack’d immediately (after it is quorum committed in the local region). The documents below describe the consistency levels and tradeoffs: https://docs.microsoft.com/en-us/azure/cosmos-db/consistency-levels https://docs.microsoft.com/en-us/azure/cosmos-db/consistency... https://docs.microsoft.com/en-us/azure/cosmos-db/consistency-levels-tradeoffs https://docs.microsoft.com/en-us/azure/cosmos-db/consistency... Thanks!