An operations monitoring application uses an Azure Cosmos DB API for NoSQL account with a single write region in East US and read replicas in West US and East Asia. The database account is currently configured with the default Session consistency level. The development team needs to optimize the application for both performance and read guarantees.
Which two statements regarding Azure Cosmos DB consistency level configurations and their trade-offs are correct? (Select two.)
- Switching the default consistency level from Session to Strong will double the Request Unit (RU) cost for read operations because reads require a quorum check across replica regions to ensure the latest version of data is returned.Cevap
- When using the default Session consistency, if a web app writes a tracking record using one client instance and subsequently reads it using a different client instance, the read may return stale data unless the application explicitly passes the session token from the write operation to the read client.Cevap
- CConfiguring Bounded Staleness consistency will double the Request Unit (RU) cost for write operations because the database must block write acknowledgments until they are replicated to a majority of secondary regions.
- DTo guarantee that a customer's browser session always reads its own writes across multiple scale-out web server instances, you should change the default consistency level to Consistent Prefix, which automatically scopes replication boundaries to individual client threads.
- EIf reads under Session consistency frequently return stale data due to partition skew, you should change the container's partition key to a low-cardinality attribute such as the status code to force synchronous replication across physical partitions.
Cevap
Switching to Strong consistency doubles read RU costs due to replica quorum requirements, and when using Session consistency across different client instances, the session token must be explicitly passed to guarantee read-your-own-writes.
The correct statements are that switching the default consistency to Strong will double the RU cost for reads due to quorum reads, and that Session consistency requires passing the session token to guarantee read-your-own-writes when reads and writes occur on separate client instances.
Adım Adım Çözüm
Anahtar Kavram
Azure Cosmos DB consistency levels and their performance, cost, and session scoping behavior.