DVA-C02 Question 92
Single answerYou are building an application that uses Amazon DynamoDB to store user profile data. The application performs frequent read operations to retrieve user details after updates. To ensure that users always see the latest updated data when reading from DynamoDB, which consistency model should you use?
- A
Strongly consistent reads
- B
Eventually consistent reads
- C
DynamoDB Streams with eventual consistency
- D
DynamoDB Accelerator (DAX) with eventual consistency
Show answer and explanation
Correct answer: A
Explanation
When the application requires users to always see the most up-to-date data, strongly consistent reads should be used in DynamoDB. Strongly consistent reads guarantee that the data returned reflects the most recent write operation. Eventually consistent reads and other options like DAX or Streams may not meet this requirement as they allow for the possibility of stale data.
- A. Correct.
Strongly consistent reads ensure that the data returned by a read operation always reflects the latest completed write operation, making it the correct choice for scenarios where consistency is critical.
- B. Incorrect.
Eventually consistent reads may return stale data as they do not guarantee the latest updates are reflected immediately, which does not meet the requirement for always showing the latest data.
- C. Incorrect.
DynamoDB Streams provide a near real-time log of changes in the table but do not influence the consistency model of read operations. This is unrelated to ensuring the latest data is read.
- D. Incorrect.
DynamoDB Accelerator (DAX) is an in-memory caching service that improves read performance but uses eventual consistency by default. This does not guarantee the latest data is retrieved.