Microsoft

DP-420 practice question 20

Designing and Implementing Cloud-Native Applications Using Microsoft Azure Cosmos DB · free question 20 of 20

Question

You are building an application that will store data in an Azure Cosmos DB for NoSQL account. The account uses the session default consistency level. The account is used by five other applications. The account has a single read-write region and 10 additional read regions. Approximately 20 percent of the items stored in the account are updated hourly. Several users will access the new application from multiple devices. You need to ensure that the users see the same item values consistently when they browse from the different devices. The solution must NOT affect the other applications. Which two actions should you perform? Each correct answer presents part of the solution. NOTE: Each correct selection is worth one point.
  • A. Set the default consistency level to eventual
  • B. Associate a session token to the device
  • C. Use implicit session management when performing read requests
  • D. Provide a stored session token when performing read requests Correct
  • E. Associate a session token to the user account Correct

Explanation

Session consistency guarantees read-your-writes only within a session, and each device would otherwise have its own client and session. Storing the session token with the user account and passing that stored token on read requests makes every device of the same user participate in one session, without changing the account default that the other applications rely on. Associating the token with a device or relying on implicit SDK session management keeps sessions per device, and switching the default to eventual weakens consistency and affects every application.

Need the theory? Learn it free in the DP-420 course on Godlike Academy

Practice the whole free set

Answer all 20 free DP-420 questions with instant feedback, or unlock all 211 questions with Learn and Exam modes.