Medium1 markMultiple Choice
Domain 2.3: Recommend a data storage solutionDomain 2Storage RecommendationCosmos DBConsistency Levels

AZ-305 · Question 25 · Domain 2.3: Recommend a data storage solution

You are designing a globally distributed e-commerce application using Azure Cosmos DB.

The application has a shopping cart feature. You have the following requirements for the shopping cart data:

  • Users must always be able to read their own latest writes (e.g., if they add an item to the cart, they must see it immediately on the next page load).
  • The database must provide high availability and low latency.
  • You want to optimize Request Unit (RU) costs compared to the strongest consistency levels.

Which TWO consistency levels meet these requirements? (Select TWO)

Answer options:

A.

Session

B.

Bounded Staleness

C.

Eventual

D.

Consistent Prefix

E.

Strong

How to approach this question

Identify the requirement 'read your own writes'. Session consistency is designed exactly for this. Stronger consistencies (Bounded Staleness, Strong) also include this guarantee, but Strong violates the cost/latency requirement.

Full Answer

Session consistency is the most widely used consistency level for applications. It provides 'read your own writes' guarantees within a single client session while offering lower latency and RU costs than Strong consistency. Bounded Staleness is stronger than Session and also guarantees read-your-own-writes, while still being cheaper and faster than Strong consistency. Eventual and Consistent Prefix do not guarantee read-your-own-writes.

Common mistakes

Selecting Strong consistency, ignoring the requirement to optimize RU costs and maintain low latency (Strong consistency requires synchronous replication across regions).

Practice the full Azure Solutions Architect Expert AZ-305 Practice Exam 1

55 questions · hints · full answers · grading

More questions from this exam