Question

Difficulty: HardSet Consistency Levels for Azure Cosmos DB

An organization is deploying a globally distributed fleet management application. The database is hosted on an Azure Cosmos DB API for NoSQL account configured with multi-region writes enabled across three regions: East US, West US, and North Europe. Each region handles local telemetry data ingestion and updates from fleet vehicles. The application has the following requirements:
- Readings from vehicles must be processed with low write latency.
- Across all regions, telemetry readings must be read in the exact order they were written.
- The read lag between the write region and other regions must not exceed a maximum of 55 minutes or 10,00010,000 updates.

Which consistency level should you configure as the default for the Azure Cosmos DB account?

  1. A
    Strong
  2. B
    Session
  3. Bounded StalenessAnswer
  4. D
    Eventual

Answer

Bounded Staleness
Bounded Staleness consistency is the correct choice because it allows the developer to define a maximum lag in terms of time (up to 55 minutes) and updates (up to 10,00010,000 updates). It is fully supported on Azure Cosmos DB accounts with multi-region writes enabled and ensures that reads from any region are guaranteed to see updates in the correct order (Consistent Prefix).

Step-by-Step Solution

1
Analyze the write distribution model of the Azure Cosmos DB account.
The account is configured with multi-region writes enabled across three regions.
This configuration immediately rules out Strong consistency, which is not supported for multi-region write accounts.
2
Evaluate the ordering and staleness requirements.
Reads must be guaranteed to be stale by no more than 55 minutes or 10,00010,000 updates, and must maintain order (Consistent Prefix).
Bounded Staleness is the only consistency level that allows configuring a maximum staleness bound of TT (time) and KK (operations) while guaranteeing Consistent Prefix ordering.
3
Evaluate Session consistency under the multi-client/multi-region scenario.
Session consistency only guarantees read-your-writes and ordering within the same client session, not across independent client sessions globally.
Without passing session tokens between clients, Session consistency cannot guarantee the maximum lag requirements across different regions/sessions.

Key Concept

Azure Cosmos DB Consistency Levels in Multi-Region Write Configurations
Rate this question