A developer is configuring an Azure Cosmos DB account. The application requires that reads must never see out-of-order writes. However, the application can tolerate some replication lag and must not rely on client-managed session tokens. Which two consistency levels meet these requirements? (Select two)
- AStrong
- Bounded StalenessAnswer
- CSession
- Consistent PrefixAnswer
- EEventual
Answer
Consistent Prefix and Bounded Staleness are the correct options because they both guarantee that reads never see out-of-order updates (maintaining write order) while allowing replication lag and not requiring client-managed session tokens.
Consistent Prefix and Bounded Staleness both guarantee that updates are returned in the order they were written (Consistent Prefix). Bounded Staleness adds a constraint on how far behind the writes the reads can lag (based on time or version count ), whereas Consistent Prefix allows arbitrary lag as long as order is preserved. Neither requires managing session tokens.
Step-by-Step Solution
Key Concept
Azure Cosmos DB consistency levels and their guarantees regarding order, replication lag, and session token dependency.