DynamoDB interview question · Most asked

What read consistency options does DynamoDB offer?

Summary

Eventually consistent reads (the default) may not reflect a write from the last moment but cost half as much; strongly consistent reads (ConsistentRead: true) return the latest committed write in the Region. GSIs and streams support only eventually consistent reads.

Longer Answer

An eventually consistent read usually catches up within a second. Use strong reads for read-after-write flows where it matters (a user immediately viewing what they saved), or design the UI to use the data already in hand. Strongly consistent reads are not available from a GSI, so a pattern needing them must be served by the base table or an LSI. Global tables have their own cross-Region consistency model.

Key Points

  • Eventual (default, half price) vs strong.
  • No strong reads on GSIs.
  • Strong reads for read-after-write needs.

More most-asked DynamoDB questions

← All DynamoDB questions