Question

Difficulty: EasySet Consistency Levels for Azure Cosmos DB

An organization deploys a globally distributed web application using Azure Cosmos DB. The application has a requirement that when a manager updates a system setting in client session AA, all other administrators using client session BB in other regions must immediately see the updated setting. The developer does not want to pass or share session tokens between these separate client sessions. Which consistency level should be selected to meet this requirement?

  1. A
    Session
  2. StrongAnswer
  3. C
    Consistent Prefix
  4. D
    Eventual

Answer

Strong consistency must be selected to guarantee that all client sessions immediately read the latest writes without needing to share session tokens.
Strong consistency offers a linearizability guarantee, ensuring that reads are guaranteed to return the most recent committed version of an item. This satisfies the requirement of immediate update visibility across different client sessions without token sharing.

Step-by-Step Solution

1
Analyze the consistency requirement.
The application requires that updates made in one client session (AA) must be immediately visible to other client sessions (BB).
This establishes a cross-session global read-after-write consistency requirement.
2
Check constraints on session tokens.
The requirement specifies that the developer does not want to share or manage session tokens.
This rules out using Session consistency with token propagation.
3
Identify the consistency level that guarantees immediate visibility globally.
Strong consistency is the only level that guarantees that any read operation always returns the most recent committed write globally.
Selecting Strong consistency ensures the updates are synchronously replicated and committed across all replica sets before the write is acknowledged.

Key Concept

Azure Cosmos DB Consistency Levels
Estimated Time:1m 0s
Rate this question