Microsoft Azure (50 Qs)•Part 3: Advanced Internals, Scale & Production Patterns (Senior / Lead)
Azure Cosmos DB: The 5 Consistency Levels.
senior LevelazureAdvanced Internals
In Simple Words: Cosmos DB is a globally distributed NoSQL database offering five precise consistency levels, allowing developers to balance latency against data freshness:
- Strong: Linearizable consistency; reads guaranteed to return the latest committed write (highest latency, single-region write).
- Bounded Staleness: Reads lag behind writes by at most $K$ versions or $T$ time.
- Session (Default, 95% of apps): Monotonic reads and read-your-own-writes within the same client session.
- Consistent Prefix: Updates never seen out of order; may lag behind latest writes.
- Eventual: Lowest latency and highest availability; out-of-order reads possible until data converges.