A global SaaS provider uses Azure Cosmos DB for its multi-tenant application's data store. The application requires strong data consistency across all regions for critical operations, ensuring that all reads return the most recently written data, regardless of the region. They need a DR strategy that supports this requirement while maintaining high availability. Which Cosmos DB feature should they leverage?
- AMulti-region writes with Eventual Consistency
- BMulti-region writes with Strong Consistency
- CMulti-region writes with Bounded Staleness Consistency
- DSingle-region write with Session Consistency
Show answer & explanationAnswer & explanation
Correct answer: B. Multi-region writes with Strong Consistency
To ensure that all reads return the most recently written data across all regions ('strong data consistency'), Multi-region writes with Strong Consistency is the only option. While Strong Consistency typically restricts multi-region writes in some databases, Cosmos DB uniquely supports this by enforcing a global consensus protocol, ensuring all replicas are consistent before a write is acknowledged. This fulfills both the strong consistency and high availability/DR requirements.
Why the other options are wrong
- A. Eventual Consistency does not guarantee that reads return the most recently written data, which violates the 'strong data consistency' requirement.
- C. Bounded Staleness Consistency allows for some staleness and is not as strict as 'strong consistency' for critical operations.
- D. Single-region write means a DR failover would involve changing the write region, and Session Consistency does not guarantee strong consistency across all regions.
Cosmos DB Multi-Region Writes (Strong Consistency)
An Azure Cosmos DB capability that allows writes to any region while ensuring strong consistency globally, meaning all reads see the latest committed write.
- Unique capability among globally distributed NoSQL databases.
- Achieves strong consistency via a global consensus protocol.
- Provides highest data consistency and availability for mission-critical apps.
Memory trick: For ultimate data truth, choose Strong and write anywhere.