Question

Difficulty: EasySet Consistency Levels for Azure Cosmos DB

Match each Azure Cosmos DB consistency level on the left with its corresponding behavior or guarantee on the right.

  • StrongGuarantees that reads always return the most recent version of an item, requiring a synchronous write commit across all replica sets before returning success.
  • SessionProvides read-your-writes and monotonic read guarantees for a specific client connection, which is the default consistency level for new databases.
  • Bounded StalenessGuarantees that reads may lag behind writes by a user-defined threshold of either operations (KK) or time interval (TT).
  • EventualProvides no ordering guarantees for reads, but offers the maximum throughput and lowest latency as replicas converge asymptotically.

Answer

Strong consistency matches with synchronous write updates and most recent version reads; Session consistency matches with connection-scoped read-your-writes and is the default setting; Bounded Staleness matches with configuration of staleness thresholds (KK or TT); Eventual consistency matches with no ordering guarantees and lowest latency.
Strong consistency matches with synchronous write replication because it ensures reads always receive the most recent committed state. Session consistency matches with connection-scoped guarantees and is the default level. Bounded Staleness matches with defined thresholds (KK or TT) because it guarantees reads do not lag beyond those limits. Eventual consistency matches with no ordering guarantees and lowest latency because replication is fully asynchronous.

Step-by-Step Solution

1
Identify the characteristics of Strong consistency.
Strong consistency requires synchronous quorum write agreement, meaning reads always see the absolute latest write.
To match Strong with its definition of absolute consistency at the cost of latency.
2
Identify the characteristics of Session consistency.
Session consistency is the default level and guarantees that within the same session/client connection, the client will read their own writes.
To match Session with its connection-specific guarantees.
3
Identify the characteristics of Bounded Staleness consistency.
Bounded Staleness allows configuration of a staleness window, defined by either maximum versions (KK) or time duration (TT).
To match Bounded Staleness with its defined lag parameter constraints.
4
Identify the characteristics of Eventual consistency.
Eventual consistency has no order guarantees, permitting replicas to catch up out-of-order asynchronously, yielding the lowest latency.
To match Eventual with its weakly consistent, highly performant behaviors.

Key Concept

Azure Cosmos DB Consistency Levels
Rate this question