exam questions

Exam AZ-204 All Questions

View all questions & answers for the AZ-204 exam

Exam AZ-204 topic 3 question 44 discussion

Actual exam question from Microsoft's AZ-204
Question #: 44
Topic #: 3
[All AZ-204 Questions]

You are developing an inventory tracking solution. The solution includes an Azure Function app containing multiple functions triggered by Azure Cosmos DB. You plan to deploy the solution to multiple Azure regions.

The solution must meet the following requirements:

• Item results from Azure Cosmos DS must return the most recent committed version of an item.
• Items written to Azure Cosmos DB must provide ordering guarantees.

You need to configure the consistency level for the Azure Cosmos DB deployments.

Which consistency level should you use?

  • A. consistent prefix
  • B. eventual
  • C. bounded staleness
  • D. strong
  • E. session
Show Suggested Answer Hide Answer
Suggested Answer: D 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
LuchoGonzalez
Highly Voted 1 year, 9 months ago
Strong consistency offers a linearizability guarantee. Linearizability refers to serving requests concurrently. 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. Source: https://learn.microsoft.com/en-us/azure/cosmos-db/consistency-levels
upvoted 13 times
...
Xardas
Highly Voted 1 year, 9 months ago
I believe its C 'bounded staleness' Because strong consistency is not supported for multiple regions
upvoted 11 times
manopeydakon
1 year, 3 months ago
Yes, the Strong consistency level is supported in Azure Cosmos DB for multiple regions. When you configure Azure Cosmos DB with multiple regions, you have the option to choose the consistency level that fits your application's requirements. The Strong consistency level ensures that, regardless of the region being accessed, each read operation returns the most recent committed version of an item and maintains ordering guarantees. This is achieved by synchronously replicating writes across all regions before acknowledging the write operation.
upvoted 4 times
...
tarek0811
1 year, 9 months ago
Azure Cosmos DB accounts configured with multiple write regions can't be configured for strong consistency as it isn't possible for a distributed system to provide an RPO of zero and an RTO of zero https://learn.microsoft.com/en-us/azure/cosmos-db/consistency-levels
upvoted 6 times
1CY1
10 months, 4 weeks ago
...strong consistency completes an operation only after ensuring that it has been committed to all regions within an account. https://learn.microsoft.com/en-us/azure/cosmos-db/consistency-levels#write-latency-and-strong-consistency
upvoted 2 times
...
oskx2
1 year, 1 month ago
That is true but there is no mention of "multiple write regions" mentioned in the question. You can have strong consistency and multiple regions (notice it is not multiple write regions): https://learn.microsoft.com/en-us/azure/cosmos-db/consistency-levels#write-latency-and-strong-consistency
upvoted 5 times
...
...
...
cmmr
Most Recent 5 months, 1 week ago
This page explains it pretty well: https://learn.microsoft.com/en-us/azure/cosmos-db/consistency-levels#strong-consistency It shall be strong, as the write is only commited once it's replicated to all regions, and therefore all reading parties (from all regions) read the last inserted value (a tradeoff between availability + throughput and consistency)
upvoted 1 times
...
Vichu_1607
5 months, 3 weeks ago
Selected Answer: D
D. strong: Strong consistency guarantees that reads always return the most recent committed version of an item. It also provides linearizability, which ensures that all operations are seen in a strict order. This meets both requirements of returning the most recent committed version and providing ordering guarantees.
upvoted 1 times
...
0cc50bf
8 months, 2 weeks ago
There is a trick here - the SOLUTION is deployed to multiple regions. That only contains the function app. Nowhere does it say that the COSMOS db is in multiple regions. Therefore, Strong is perfectly acceptable.
upvoted 2 times
...
Christian_garcia_martin
9 months, 1 week ago
D is correct .According to the requirements that item results from Azure Cosmos DB must return the most recent committed version of an item and items written to Azure Cosmos DB must provide ordering guarantees, the Strong consistency level should be used. Strong consistency offers linearizability, which is the highest consistency level available. It guarantees that once an operation completes, the result will be immediately visible to all subsequent operations. This ensures that the most recent committed version of an item is always returned and also provides ordering guarantees, but this comes with a trade-off as strong consistency may introduce higher latencies and reduced availability compared to other consistency levels.
upvoted 1 times
...
Munwalinwali
9 months, 4 weeks ago
Selected Answer: D
"Most recent"
upvoted 1 times
...
jobolesonihal
1 year, 1 month ago
Selected Answer: D
The problem doesn't specify any condition (versions or time lag) which may allow bounded staleness. Only Strong consistency guarantees the reading the more recent commit.
upvoted 3 times
...
FeriAZ
1 year, 2 months ago
Selected Answer: D
Item results from Azure Cosmos DB must return the most recent committed version of an item: Strong consistency ensures that once a write operation is acknowledged, all subsequent read operations will return the most recent committed version of the data. This means that any read operation will see the effects of the latest write operation. Items written to Azure Cosmos DB must provide ordering guarantees: Strong consistency also ensures ordering guarantees. It means that if one write operation is acknowledged before another, then the order of these operations is preserved for all subsequent read operations.
upvoted 1 times
...
lednari
1 year, 4 months ago
Selected Answer: D
Strong - doesnt mention multi-region writes - the multi-region functions are triggered hence reads
upvoted 3 times
...
CarlosTheBoldest
1 year, 4 months ago
Selected Answer: C
The key is the multiple regions
upvoted 2 times
...
Jarynpl
1 year, 5 months ago
Selected Answer: C
Azure Cosmos DB accounts configured with multiple write regions can't be configured for strong consistency as it isn't possible for a distributed system to provide an RPO of zero and an RTO of zero. Additionally, there are no write latency benefits on using strong consistency with multiple write regions because a write to any region must be replicated and committed to all configured regions within the account. This scenario results in the same write latency as a single write region account. https://learn.microsoft.com/en-us/azure/cosmos-db/consistency-levels#strong-consistency-and-multiple-write-regions
upvoted 1 times
Weam
1 year, 5 months ago
but the question didn't mention that there will be multiple WRITE regions ?
upvoted 3 times
...
...
RikinPatel
1 year, 6 months ago
Selected Answer: D
strong is correct ans.: Strong consistency: Strong consistency offers a linearizability guarantee. Linearizability refers to serving requests concurrently. 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. Bounded staleness consistency: With Bounded Staleness consistency, reads issued against a non-primary region may not necessarily return the most recent version of the data globally, but are guaranteed to return the most recent version of the data in that region, which will be within the maximum staleness boundary globally. https://learn.microsoft.com/en-us/azure/cosmos-db/consistency-levels
upvoted 3 times
...
tamerm
1 year, 7 months ago
Selected Answer: D
I think it's D. Strong consistency is not supported for multiple WRITE regions, and I don't see any such requirements in the question. https://learn.microsoft.com/en-us/azure/cosmos-db/high-availability#multiple-write-regions
upvoted 2 times
RikinPatel
1 year, 6 months ago
as per Que.: You plan to deploy the solution to multiple Azure regions.
upvoted 1 times
...
...
Vladimir_Gajinov
1 year, 8 months ago
Selected Answer: C
I think it's Bounded Staleness because it's not mentioned that read is executed right after write operation so I think it's acceptable to have small latency between write and read operations. I would go with this!
upvoted 1 times
...
drkpnsh
1 year, 8 months ago
But for Strong consistency, it also says Bounded Staleness in a multi-write account is an anti-pattern. So I really don't understand what the correct answer is. Bounded Staleness or Strong?
upvoted 3 times
...
Papee
1 year, 9 months ago
C. bounded staleness Item results return the most recent committed version of an item: Bounded staleness ensures that reads are served from a version of the data that is within a specified lag from the current write operation. This means that you can read the most recent committed version of an item while still providing a level of consistency. Items written to Azure Cosmos DB must provide ordering guarantees: Bounded staleness guarantees that writes are ordered and committed before being read. While other consistency levels like "Strong" and "Consistent prefix" also provide strong consistency, "Bounded staleness" offers a balance between consistency and availability, which is suitable for scenarios where the most recent data is needed with some level of delay.
upvoted 3 times
ay_m
1 year, 8 months ago
"Reads when using Bounded Staleness returns the latest data available in that region by reading from two available replicas in that region." With bounded staleness there is a certain amount of lag, so it does not return the most recently committed write
upvoted 1 times
...
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago