What are global tables in DynamoDB and how does multi-region replication work?
Learn how DynamoDB global tables enable multi-active, multi-region replication with last-writer-wins conflict resolution, DR and low global latency.
Expected Interview Answer
DynamoDB global tables are a fully managed, multi-active, multi-region replication feature that keeps identical copies of a table in two or more AWS Regions, so any Region can serve both reads and writes with local low latency.
Under the hood, DynamoDB streams every write out of the originating Region and asynchronously applies it to all replica Regions, usually propagating within a second. Because writes can happen in any Region simultaneously, global tables use a last-writer-wins conflict resolution based on each item's timestamp, so the most recent write eventually wins on every replica. Replication is eventually consistent across Regions even though reads within a single Region can still be strongly consistent, and the feature gives you disaster recovery, low-latency global access, and automatic failover without you building any replication pipeline yourself.
- Local low-latency reads and writes for globally distributed users
- Multi-active: every replica accepts writes, not just one leader
- Built-in disaster recovery and Region failover
- Fully managed replication with no custom sync code
- 99.999% availability SLA for global tables
AI Mentor Explanation
Picture an international series with live scorecards kept simultaneously in stadiums in India, England, and Australia. Any scorer can log a run locally so the crowd sees it instantly, and each entry is streamed to the other grounds within a second. If two scorers edit the same delivery, the one with the later timestamp wins — exactly how global tables replicate multi-active writes and resolve conflicts.
Step-by-Step Explanation
Step 1
Create the base table
Provision a DynamoDB table in one Region; global tables now require the current version and DynamoDB Streams enabled automatically.
Step 2
Add replica Regions
Add one or more additional Regions as replicas; DynamoDB creates identical tables and backfills existing data into them.
Step 3
Writes stream out
Every write in any Region is captured and asynchronously propagated to all other replica Regions, typically within a second.
Step 4
Conflict resolution
Concurrent writes to the same item are settled by last-writer-wins using each item's timestamp, so all replicas converge on one value.
Step 5
Route traffic locally
Point each application to its nearest Region for low-latency reads and writes, and fail over to another Region if one becomes unavailable.
What Interviewer Expects
- Knows global tables are multi-active (every Region is writable)
- Understands replication is asynchronous and eventually consistent across Regions
- Can explain last-writer-wins conflict resolution via timestamps
- Connects global tables to disaster recovery and low global latency
- Aware DynamoDB Streams underpins the replication
Common Mistakes
- Thinking replication is synchronous or strongly consistent across Regions
- Assuming only one Region can accept writes (single-leader)
- Ignoring last-writer-wins and how it can silently drop a conflicting write
- Confusing cross-Region eventual consistency with in-Region strong consistency
- Forgetting that all replicas must have matching capacity settings
Best Answer (HR Friendly)
“DynamoDB global tables keep the same table copied across several AWS Regions so users everywhere get fast, local access. AWS automatically syncs changes between Regions within about a second, which also gives you built-in backup and failover if one Region goes down.”
Code Example
aws dynamodb update-table \
--table-name Orders \
--region us-east-1 \
--replica-updates '[{"Create": {"RegionName": "eu-west-1"}}]'
# Verify the replicas
aws dynamodb describe-table \
--table-name Orders \
--region us-east-1 \
--query 'Table.Replicas'Follow-up Questions
- How does DynamoDB resolve write conflicts between two Regions?
- What consistency guarantees do you get within a Region versus across Regions?
- How would you design a Region failover strategy on top of global tables?
- What role does DynamoDB Streams play in global table replication?
- What are the cost implications of adding replica Regions?
MCQ Practice
1. How do DynamoDB global tables resolve concurrent writes to the same item in different Regions?
Global tables use last-writer-wins conflict resolution, keeping the write with the most recent timestamp so all replicas converge.
2. Which statement about global table consistency is correct?
Replication between Regions is asynchronous and eventually consistent, though reads within a single Region can still be strongly consistent.
3. What AWS feature underpins global table replication?
DynamoDB captures writes via streams and asynchronously propagates them to every replica Region.
Flash Cards
Are DynamoDB global tables single-writer or multi-active? — Multi-active — every replica Region can accept both reads and writes.
How is cross-Region conflict resolved? — Last-writer-wins based on each item's timestamp.
What consistency does cross-Region replication provide? — Eventual consistency, typically propagating within one second.
What is the typical use case for global tables? — Low-latency global access plus disaster recovery and Region failover.