AZ-204 · Question #553
AZ-204 Question #553: Real Exam Question with Answer & Explanation
For read operations, the consistency level should be configured in app1 (the client/SDK level) because Azure Cosmos DB allows overriding the default consistency on a per-operation basis through the request options in the SDK, which satisfies the requirement to enforce consistency
Question
Drag and Drop Question You have an Azure Cosmos DB for NoSQL API account named account1 and a database named db1. An application named app1 will access db1 to perform read and write operations. You plan to modify the consistency levels for read and write operations performed by app1 on db1. You must enforce the consistency level on a per-operation basis whenever possible. You need to configure the consistency level for read and write operations. Which locations should you configure? To answer, move the appropriate locations to the correct operations. You may use each location once, more than once, or not at all. You may need to move the split bar between panes or scroll to view content. NOTE: Each correct selection is worth one point. Answer:
Explanation
For read operations, the consistency level should be configured in app1 (the client/SDK level) because Azure Cosmos DB allows overriding the default consistency on a per-operation basis through the request options in the SDK, which satisfies the requirement to enforce consistency 'whenever possible' at the most granular level. For write operations, the consistency level must be configured at account1 (the account level) because Cosmos DB does not support overriding consistency levels for write operations on a per-request basis - the write consistency is always governed by the account-level default setting. The database (db1) itself has no consistency level configuration option in Azure Cosmos DB.
Topics
Community Discussion
No community discussion yet for this question.