nerdexam
Microsoft

AZ-204 · Question #205

Drag and Drop Question You are developing a solution for a hospital to support the following use cases: - The most recent patient status details must be retrieved even if multiple users in different…

The correct answer is Strong; Bounded Staleness; Eventual. Azure Cosmos DB Consistency Levels - Exam Explanation Background: The Five Levels (Strongest -> Weakest) | Level | Guarantee | |---|---| | Strong | Always reads the most recent committed write (linearizable) | | Bounded Staleness | Reads lag writes by at most K versions or T…

Submitted by salim_om· Mar 30, 2026Develop for Azure storage

Question

Drag and Drop Question You are developing a solution for a hospital to support the following use cases: - The most recent patient status details must be retrieved even if multiple users in different locations have updated the patient record. - Patient health monitoring data retrieved must be the current version or the prior version. - After a patient is discharged and all charges have been assessed, the patient billing record contains the final charges. You provision a Cosmos DB NoSQL database and set the default consistency level for the database account to Strong. You set the value for Indexing Mode to Consistent. You need to minimize latency and any impact to the availability of the solution. You must override the default consistency level at the query level to meet the required consistency guarantees for the scenarios. Which consistency levels should you implement? To answer, drag the appropriate consistency levels to the correct requirements. Each consistency level may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content. NOTE: Each correct selection is worth one point. Answer:

Exhibit

AZ-204 question #205 exhibit

Answer Area

Drag items

StrongBounded StalenessConsistent PrefixEventual

Correct arrangement

  • Strong
  • Bounded Staleness
  • Eventual

Explanation

Azure Cosmos DB Consistency Levels - Exam Explanation

Background: The Five Levels (Strongest -> Weakest)

LevelGuarantee
StrongAlways reads the most recent committed write (linearizable)
Bounded StalenessReads lag writes by at most K versions or T seconds
SessionConsistent within a single client session
Consistent PrefixReads never see out-of-order writes, but can lag arbitrarily
EventualNo ordering guarantee; eventually converges to latest

The account default is Strong, but the task is to override per query using the weakest level that still satisfies each requirement - because the question explicitly asks to minimize latency and availability impact.


Placement Explanations

1. Most recent patient status - multiple users, different locations -> Strong

This is the only level that guarantees linearizability - every read reflects the most recently committed write, regardless of which region performed the update. No weaker level can promise "most recent" in a multi-writer distributed scenario. This matches the account default, so no override is technically needed, but it is the correct answer.

2. Health monitoring data - current or prior version -> Bounded Staleness

"Current or prior version" signals you can tolerate being slightly behind, but not arbitrarily stale. Bounded Staleness lets you configure a maximum staleness window (e.g., K=1 version behind). This directly maps to "current or the prior version" while still providing a defined bound. Consistent Prefix is a common wrong answer here - it also prevents out-of-order reads but places no bound on how far behind the data can be, which is weaker than required.

3. Final billing record after discharge -> Eventual

Once a patient is discharged and all charges are assessed, the record is frozen - no further writes occur. Because the data is static, even the weakest consistency level will eventually return the correct final record. Eventual consistency provides the lowest latency and highest availability, directly satisfying the "minimize latency and availability impact" constraint. Using anything stronger here wastes resources unnecessarily.


Common Mistakes

  • Using Strong for everything - satisfies correctness but violates the "minimize latency/availability impact" requirement.
  • Choosing Consistent Prefix for use case 2 - it prevents out-of-order reads but doesn't bound staleness, so "prior version" could be arbitrarily old.
  • Choosing Session for use case 1 - Session only guarantees consistency within one client session, not across multiple users in different locations.
  • Not recognizing the "frozen data" signal - when a record is finalized and immutable, Eventual is always the right answer for latency optimization.

Topics

#Cosmos DB#Consistency Levels#NoSQL#Data Storage

Community Discussion

No community discussion yet for this question.

Full AZ-204 Practice