Saturday, January 18, 2020

Data Platform Tips 52 - Consistency levels in Azure Cosmos DB

Azure Cosmos DB supports different data consistency levels. Azure Cosmos DB provides data consistency as a spectrum of choices from Strong consistency to eventual consistency along many consistency choices along the spectrum. Developers can choose from 5 different consistency levels depending on their use cases. Each consistency model provides Availability and Performance trade offs and are backed by SLAs.
  • strong
  • bounded staleness
  • session
  • consistent prefix
  • eventual









Strong - This consistency level offers serving requests concurrently and the reads are guaranteed to return the most recent (last committed) version of the item.

Bounded Staleness - This consistency level offers consistent prefix guarantee where by reads might lag behind writes by at most "K" versions (i.e., "updates") of an item or by "T" time interval.

Session - This consistency level offers consistent prefix monotonic reads, monotonic writes, read-your-writes, and write-follows-reads guarantees. Clients outside of the session performing writes will see eventual consistency.

Consistent Prefix - This consistency level offers guarantee that reads never see out-of-order writes.

Eventual - There's no ordering guarantee for reads. In the absence of any further writes, the replicas eventually converge.

No comments:

Post a Comment