Exam AZ-204 All QuestionsBrowse all questions from this exam
Question 62

DRAG DROP -

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.

Select and Place:

    Correct Answer:

    Box 1: Strong -

    Strong: Strong consistency offers a linearizability guarantee. The reads are guaranteed to return the most recent committed version of an item. A client never sees an uncommitted or partial write. Users are always guaranteed to read the latest committed write.

    Box 2: Bounded staleness -

    Bounded staleness: The reads are guaranteed to honor the consistent-prefix guarantee. The reads might lag behind writes by at most "K" versions (that is

    "updates") of an item or by "t" time interval. When you choose bounded staleness, the "staleness" can be configured in two ways:

    The number of versions (K) of the item

    The time interval (t) by which the reads might lag behind the writes

    Box 3: Eventual -

    Eventual: There's no ordering guarantee for reads. In the absence of any further writes, the replicas eventually converge.

    Incorrect Answers:

    Consistent prefix: Updates that are returned contain some prefix of all the updates, with no gaps. Consistent prefix guarantees that reads never see out-of-order writes.

    Reference:

    https://docs.microsoft.com/en-us/azure/cosmos-db/consistency-levels

Discussion
AndresMza

Answers are correct

mlantonis

Box 1: Strong Box 2: Bounded staleness Box 3: Eventual Note: Consistent prefix: Updates that are returned contain some prefix of all the updates, with no gaps. Consistent prefix guarantees that reads never see out-of-order writes. Reference: https://docs.microsoft.com/en-us/azure/cosmos-db/consistency-levels

TakumaK

what is the Note for in your comment? you just copied it from the correct answer description which doesn't make sense to me.

MrAzz

Consistent Prefix: This guarantees that a read operation will return the most recent version of the data written (the order is correct), but it could be outdated. It does not guarantee the most recent value of all writes anywhere. For example, if data is written in A, B, C order, the user may get A, B or A, B, C. It will not get out of order writes such as A, C or A, C, B. https://www.mssqltips.com/sqlservertip/7158/azure-cosmos-db-consistency-levels-strong-bounded-staleness-session-consistent-prefix-eventual/

AhmedAbdelAziz

Consistent Prefix keep the order only within transaction , but with single write it behave like Eventual

[Removed]

Box 1: Strong Box 2: Argument 1: You cannot set the staleness less than 10 versions, so Box-2 is not Bounded staleness. It is not Consistent prefix because there is no control at all on how old the version you are getting. So, it has to be Strong. Argument 2: Because default consistency is Strong the writes will be synchronous in all regions. And the fact that this is Strong consistency shows that this is not multi-region writes because Strong consistency is not supported in Multi-region writes. So, a bounded-staleness will work (but it could be consistent prefix as well or even be eventual because all the replicas are kept in sync while writing. That part I'm still confused). But still making it Strong or Bounded-staleness does not matter for RUs considering both use local-minority for read. In conclusion, I plan to bring a lawyer into the exam. Absolutely silly question with full vagueness from Microsoft Box 3: This could be eventual considering the good application developer has made it as events and there is no ordering required. But it is better to choose Consistent prefix instead of Eventual.

LanGo

Got this question today (17/04/2023). Answered strong, bounded staleness, eventual. Result: 846

[Removed]

The amount of discussion in this question shows how silly the question from Microsoft is. Microsoft should consider not asking scenario questions because it all depends on a lot of assumptions.

JH81

Got this on 6/28/2023 and passed with 850. Went with answer.

AhmedAbdelAziz

We all Agreed that Box 1: Strong Box 2: Bounded staleness For Box 3 : it should be Strong as you should issue the bill with all the items added , for example in the Right Region you have item1 , item2, item3 if you use Bounded staleness or Eventual you may read in the time you issue the bill from read region item1, item2 only and for financial matter it's disaster and for the bill the order doesn't matter what matter is you should issue the bill with all items

dddddd111

This is in my exam last Sept 20, 2023. I chose same answers.

Ciupaz

Exam passed?

agiler

for box 3, why should i risk to have a wrong bill because the database was not aligned yet?

shekhar11

In my exam on 22sep 2023

kingAzure

Got this Q on my exam 25/08/2023

yawxir

Hi, How was your exam, considering the latest Open Book development ?

jakobste

In a real world scenario, if the last charge is applied and then the final bill is immediately generated from a query against the database you might be in trouble with eventual consistency. However, if you can read the data as events in order asynchronous it would not be a problem. I don't think i would go through the effort though, i would just use strong consistency to generate the final bill.

yawxir

Agreed. I think the answer in last should be Strong consistency due to financially critical scenario.

Una20

received the qn in exam 02/2022

dookebroyle

I believe it is Strong, Strong, and possibly Strong for the last answer as well. The first Strong is self explanatory. The second must be strong because bounded staleness' minimum value is 10 versions for single region and even more for multiple regions. The last Strong I believe is true because you need to be sure that all transactions are recorded before you access the final bill as a read transaction. However, it doesn't specify the maximum latency required to access the bill, and many hospitals send bills out after the patient has checked out and the data isn't needed immediately. A difficult question...the answer could be eventual as well. If anyone knows what the answer was on the exam, it would be helpful to know :)

[Removed]

I understand how you feel. A very silly question from Microsoft. It all depends on how it is handled. Impossible to guess what the question creator employee of Microsoft knows and thinks is the right answer. If his linkedin profile is given I can research what he has done in his life and guess the answer

NombreFalso

I love reading your reactions

DaniloPeres

Box 3 should be Strong From ChatGPT Key Consideration: Correct Billing Data: This implies that the data must be accurate and reflect the final charges without any inconsistencies. Decision: Strong Consistency is the safest choice for retrieving the final billing data because it ensures that you get the latest and accurate charges immediately after all assessments are done. Eventual Consistency might result in retrieving stale data if you read the billing information before the system has converged to the latest state. This could lead to inaccuracies in billing, which is unacceptable in a healthcare billing context.

Sleepers

Got this question on 27/06/2023

Papit

rcvd this question 04/2023