Microsoft Azure (50 Qs)•Part 1: Basic & Foundational Concepts (Junior / Entry-Level)
What is Azure Cosmos DB and what are its 5 consistency levels?
junior LevelCode ExampleazureBasic
In Simple Words: Cosmos DB is Microsoft's globally distributed, multi-model NoSQL database with single-digit millisecond latency:
- Strong: Linearizability; guarantees reads always see the most recent committed write globally.
- Bounded Staleness: Reads lag behind writes by at most $K$ versions or $T$ time interval (e.g. 5 seconds).
- Session (Default): Consistent prefix and monotonic reads within a single client session.
- Consistent Prefix: Guarantees updates are never seen out of order, though data may be stale.
- Eventual: Out-of-order, weakly consistent reads; highest throughput and lowest latency.
text
Cosmos DB Consistency Spectrum:
Strong ──► Bounded Staleness ──► Session ──► Consistent Prefix ──► Eventual
[Max Consistency, Lower Throughput] ◄───► [Max Throughput, Eventual Consistency]