AZ-305 Practice Question 14: Cosmos Consistency Bound
Microsoft Azure Solutions Architect Expert (AZ-305) · Test 2 · question 4 of 10
A trading firm stores position data in an Azure Cosmos DB for NoSQL account with a single write region in East US and read regions in West Europe and Australia East. The risk committee sets these requirements for the design:
- A read served from any region must never be more than five minutes, or 100,000 updates, behind the write region, whichever limit is reached first. - The staleness bound must hold for every reader, not only for the client session that performed the write. - Write latency must not include a synchronous commit across all three regions. - The bound the design chooses must also define the account's recovery point objective if the write region is lost.
Which consistency level should you configure on the account?
Show answer and explanation
Answer:
Bounded staleness is the only level that lets you *state* the lag. The maximum staleness between regions is configured as K versions of an item or a time interval T, whichever is reached first, and writes to a partition are throttled if the lag would exceed the bound, which is precisely the "never more than five minutes or 100,000 updates" requirement. The guarantee is a property of the account rather than of a client session, so every reader inherits it, and writes still commit to a local majority rather than across all regions. Microsoft's own RPO table lists the recovery point objective for a multi-region, single-write-region account at bounded staleness as K and T, so the same setting defines the RPO the committee asked about.
Option A would satisfy freshness but breaks the third requirement outright: with strong consistency and more than one region, a write is committed only after every region acknowledges it, so write latency becomes roughly twice the round-trip time between the two farthest regions, East US to Australia East here.
Option C guarantees read-your-writes and write-follows-reads only within a single client session. A different reader in West Europe has no lag guarantee at all, and a client that never wrote to a partition reads it with eventual-consistency behavior. Its documented RPO is "less than 15 minutes", not a bound the firm chooses.
Option D orders writes but does not bound how far behind a region may fall. It guarantees only that reads never see writes out of order (a transactional batch is seen whole or not at all) with single-document updates still eventually consistent, so neither the five-minute bound nor a committed RPO exists.
Reference: Consistency levels in Azure Cosmos DB