DVA-C02 Question 91
Single answerYou are developing an e-commerce application using Amazon DynamoDB to store user orders. The application performs frequent read and write operations. It is critical that the order details displayed to the user reflect the most recent data immediately after a write operation. Which read consistency model should you choose to meet this requirement?
- A
Eventually consistent reads
- B
Strongly consistent reads
- C
Read-after-write consistency
- D
Transactional reads
Show answer and explanation
Correct answer: B
Explanation
In Amazon DynamoDB, strongly consistent reads ensure that the most recent data is returned after a write operation, which is essential for applications requiring up-to-date information, such as the e-commerce application's order details. Eventually consistent reads do not guarantee this level of consistency, and the other options either do not apply or are unrelated to the specific read consistency models provided by DynamoDB.
- A. Incorrect.
Eventually consistent reads provide the best performance and scalability but do not guarantee that the most recent data will be returned immediately after a write. This does not meet the application's requirement for up-to-date data.
- B. Correct.
Strongly consistent reads guarantee that the most recent writes will be returned when data is read. This meets the application's requirement for displaying the most current order details.
- C. Incorrect.
Read-after-write consistency is a conceptual term often used in distributed systems but is not a specific read consistency model available in DynamoDB.
- D. Incorrect.
Transactional reads are used in DynamoDB transactions to ensure atomicity and isolation but are not directly related to ensuring the most recent data is returned after a write operation.