DynamoDB interview question · Most asked

What are global tables, and what consistency do they provide?

Summary

Global tables replicate a table across AWS Regions with every replica accepting reads and writes (multi-active). By default replication is asynchronous, typically within a second or so, and concurrent writes to the same item are resolved by last writer wins. AWS also offers a multi-Region strong consistency mode for global tables with different trade-offs.

Longer Answer

Use cases: low-latency access for users worldwide and Regional disaster recovery. Design implications for the default mode: avoid writing the same item in several Regions at once (route each user's writes to a home Region), make operations commutative or idempotent, and accept that a read in another Region may briefly be stale. Conditional writes and transactions are evaluated only in the Region where they run.

Key Points

  • Multi-Region, multi-active replicas.
  • Asynchronous by default, last writer wins.
  • Route an item's writes to one Region.
  • Multi-Region strong consistency option exists.

More most-asked DynamoDB questions

← All DynamoDB questions