Which Cosmos DB consistency level avoids out-of-order writes in multi-region reads?
You are developing a Cosmos DB solution that will be deployed to multiple Azure regions. Your solution must meet the following requirements: • Read operations will never receive write operations that are out of order. • Maximize concurrency of read operations in all regions. You need to choose the consistency level for the solution. Which consistency level should you use?
Community Votes
57% of anonymous learners picked answer D. Votes are pick records left by other test-takers — they are not the verified answer.
Community Insight
Tests which Cosmos DB consistency level preserves write order without an unnecessary staleness bound; the trap is choosing bounded staleness because it also orders reads but is stronger than required.
Azure Cosmos DB consistent prefix is the weakest consistency level that guarantees reads never see out-of-order writes while maximizing multi-region read concurrency. This AZ-204 guide confirms option D as the correct consistency setting for the stated Cosmos DB requirements.
Many candidates pick bounded staleness (C) because it also prevents out-of-order reads, but it imposes a staleness window and therefore does not maximize read concurrency as fully as consistent prefix.
Community Discussion (7 comments)
Comments & Corrections
No comments yet — spotted an error or have a note? Share it below.
Expert Analysis
Why the Answer Is Correct
Consistent prefix consistency in Azure Cosmos DB guarantees that read operations never see writes out of order; updates are observed in the same sequence they were committed. The question asks only for ordering, not for a maximum lag or version bound, so the weakest consistency level that still guarantees ordering is the best fit. Because consistent prefix does not enforce a staleness window, it leaves more read concurrency and availability available across all Azure regions. Therefore option D satisfies both the no-out-of-order-read requirement and the maximize-concurrency requirement.Why the Other Options Are Wrong
Session consistency (A) provides monotonic reads, read-your-writes, and write-follows-reads only within a single client session, not globally across all regions. Eventual consistency (B) allows reads to see writes out of order, which directly violates the first requirement. Bounded staleness (C) also preserves consistent-prefix ordering, but it adds a guaranteed staleness bound of K versions or T time, making it stronger than necessary and reducing read concurrency relative to consistent prefix. Strong consistency would likewise meet ordering but would further reduce availability and concurrency, confirming that consistent prefix is the intended weakest ordering-preserving level.Community Comment Notes
As de55d65 noted, eventual and bounded staleness can be ruled out because eventual permits out-of-order reads and the question provides no staleness boundary requirement; the lower the consistency, the higher the concurrency, so D fits. Mattt and Vichu_1607 argued for bounded staleness (C), but bounded staleness adds an explicit lag window that the scenario does not request and that is stronger than consistent prefix. passme847 quoted the Microsoft documentation: “the reads never see out of order writes” for consistent prefix, which directly matches the requirement. Jay456 agreed with de55d65 after reviewing the documentation, while ns4098 asked “Why not C?” — the answer is that C is stronger than the stated ordering need.Official Reference
Exam Strategy
Focus on the weakest consistency level that still meets every stated guarantee; “maximize concurrency” is the signal to avoid stronger models like bounded staleness or strong. Read the requirement keywords literally: out-of-order protection points to consistent prefix.
Frequently Asked Questions
Why isn't bounded staleness the best choice for multi-region Cosmos DB reads?
Bounded staleness also prevents out-of-order reads, but it adds a staleness window that is stronger than the question requires. Consistent prefix meets the only stated ordering guarantee while maximizing read concurrency.
Does session consistency prevent out-of-order reads across all Azure regions?
No. Session consistency guarantees ordering and read-your-writes only within a single client session, so clients in other sessions or regions are not covered by that ordering guarantee.