Reading25 min read·Module 3High exam weight

DynamoDB DAX & Global Tables

Key concepts

  • DAX for microsecond latency

  • DAX cluster architecture

  • Global Tables for multi-region

  • Eventually consistent reads

  • Streams for replication

Overview

Amazon DynamoDB is a fully managed NoSQL key-value and document database that delivers single-digit millisecond latency at any scale. Two features extend its performance and reach. DynamoDB Accelerator (DAX) is a fully managed, in-memory cache that sits in front of a DynamoDB table and drops read latency from milliseconds to microseconds. Global Tables provide a fully managed, multi-region, active-active replication of a table, so the same data is readable and writable in several AWS Regions at once.

This topic is high-yield on the SAA-C03 exam through performance and disaster-recovery scenarios. You should know when DAX accelerates reads (and when it does not help), how a DAX cluster is structured, how Global Tables replicate writes across Regions using DynamoDB Streams, what eventual consistency means for replicated reads, and the difference between caching for speed and replicating for global reach and resilience.

Cache for Speed, Replicate for Reach

Add DAX in front of a read-heavy table to serve repeated reads in microseconds with very little code change. Enable Global Tables to give users in multiple Regions local low-latency access and a multi-Region recovery posture, accepting eventual consistency for cross-Region replication.

Exam Tip

DAX accelerates eventually consistent reads (microseconds) and write-through writes, but it does NOT speed up strongly consistent reads, which bypass the cache and go to the table. Global Tables use DynamoDB Streams under the hood, require Streams enabled, replicate asynchronously (eventually consistent across Regions), and use last-writer-wins to resolve conflicts.


Key Concepts

DAX for Microsecond Latency

An In-Memory Cache Built for DynamoDB

DAX (DynamoDB Accelerator) is a write-through caching service that is API-compatible with DynamoDB, so applications use the DAX SDK client and point it at the cluster with minimal code change. It serves cached reads in microseconds instead of the single-digit milliseconds a direct table read takes, which suits read-heavy workloads with repeated key access such as product catalogs, gaming leaderboards, and configuration lookups. DAX maintains two caches: an item cache for GetItem and BatchGetItem results, and a query cache for Query and Scan results. Cached entries expire based on a configurable Time To Live (TTL).

When DAX Does Not Help

DAX speeds up eventually consistent reads, because those can be served from the cache. A strongly consistent read must reflect the most recent write, so DAX passes it through directly to the table and returns table-latency results. Write-heavy workloads gain little, because every write goes through DAX to the table (write-through) and still incurs write latency. Workloads with low cache-hit ratios (mostly unique, one-time key access) also see little benefit, since few reads are served from cache.

Reads With and Without DAX

Read typeServed from DAX cacheTypical latency
Eventually consistent read (cache hit)YesMicroseconds
Eventually consistent read (cache miss)Loaded then cachedSingle-digit milliseconds
Strongly consistent readNo (passes through to table)Single-digit milliseconds
Write (write-through)Cache updated after table writeSingle-digit milliseconds

DAX Cluster Architecture

Nodes, a Primary, and Replicas in a VPC

A DAX cluster runs inside your VPC and consists of one or more nodes. One node is the primary that handles writes and propagates them to the cluster, while the others are read replicas that serve cached reads and provide availability. For production, run a cluster of at least three nodes spread across multiple Availability Zones, so the loss of one AZ or node does not take the cache offline. The application connects to a single cluster endpoint, and the DAX client distributes reads across nodes. Access is controlled through IAM and security groups, and DAX integrates with encryption at rest and in transit.

DAX Cluster Sizing

SetupNodesUse
Development or test1 nodeLowest cost, no high availability
Production minimum3 nodes across AZsHigh availability, primary plus two replicas
High read throughputUp to 11 nodesScale read replicas for more cached reads

Global Tables for Multi-Region

Active-Active Replication Across Regions

A Global Table is a single table replicated across multiple AWS Regions, where every replica is both readable and writable (active-active). DynamoDB automatically propagates each write to every other Region, so an application can read and write to the nearest Region for low local latency and continue operating if one Region becomes unavailable. This serves global user bases and supports a multi-Region disaster-recovery strategy with low recovery time and recovery point objectives. There is no extra charge for the Global Tables feature itself, but you pay for the storage, reads, writes (billed as replicated write request units), and cross-Region data transfer in each Region.

Conflict Resolution With Last-Writer-Wins

Because every Region accepts writes, two Regions can update the same item at nearly the same time. DynamoDB resolves this with a last-writer-wins policy: the write with the most recent timestamp is kept and the other is discarded. Design applications to avoid concurrent multi-Region writes to the same item when possible (for example, route a given user or partition key to a home Region) so that last-writer-wins does not silently drop data.

Streams for Replication

DynamoDB Streams Power Global Tables

DynamoDB Streams is an ordered, time-ordered log of item-level changes (inserts, updates, deletes) in a table, retained for 24 hours. Global Tables use Streams as the replication mechanism: each write is captured in the stream and asynchronously delivered to the other Regions. Because of this, Streams must be enabled on a table before it can join a Global Table (the newer version uses NEW_AND_OLD_IMAGES). Streams also serve other use cases on their own, such as triggering AWS Lambda functions for event-driven processing, change-data-capture, and aggregation.

Eventually Consistent Reads

What Eventual Consistency Means Here

An eventually consistent read may return data that does not yet reflect a very recent write, because the read can be served from a replica that is slightly behind. A strongly consistent read always returns the latest committed write within a single Region, at the cost of higher latency and not being cacheable by DAX. Two layers of eventual consistency apply: within one Region, DynamoDB reads are eventually consistent by default; across Regions, Global Tables replicate asynchronously, so a write in one Region appears in the others usually within a second but not instantly. Strong consistency is a single-Region guarantee and does not extend across Regions.

DAX vs Global Tables

DimensionDAXGlobal Tables
Primary purposeMicrosecond read cachingMulti-Region active-active replication
ScopeSingle Region, in a VPCMultiple Regions
Helps withRead-heavy, repeated readsGlobal low latency and disaster recovery
ConsistencyCaches eventually consistent readsEventually consistent across Regions
Requires StreamsNoYes

Best Practices

TEXTDesign Guidance
1. Add DAX only for read-heavy, repeated-key workloads
   └── Skip it for write-heavy or low-hit-ratio access patterns

2. Keep strongly consistent reads aware that DAX is bypassed
   └── Those reads hit the table and return table-latency results

3. Run production DAX clusters with 3+ nodes across AZs
   ├── Primary handles writes, replicas serve cached reads
   └── A single-node cluster has no high availability

4. Enable DynamoDB Streams before creating a Global Table
   └── Streams (NEW_AND_OLD_IMAGES) are the replication channel

5. Route writes for a given key to one home Region
   └── Avoids last-writer-wins silently discarding concurrent updates

6. Use on-demand or auto scaling capacity for Global Table replicas
   └── Replicated writes consume capacity in every Region

Common Pitfalls

Pitfall 1: Expecting DAX to Speed Up Strongly Consistent Reads

Mistake: Adding DAX and assuming every read becomes microsecond-fast, including strongly consistent reads.

Why it fails: Strongly consistent reads bypass the DAX cache and go to the table, so they return single-digit millisecond latency just as before.

Correct Approach: Use DAX for eventually consistent, read-heavy access; reserve strongly consistent reads for the cases that truly need the latest write and accept table latency for them.

Pitfall 2: Choosing DAX When the Goal Is Multi-Region

Mistake: Reaching for DAX to lower latency for users spread across continents.

Why it fails: DAX lives in a single Region inside a VPC and only caches reads; it does not place data closer to users in other Regions.

Correct Approach: Use Global Tables to give each Region a local read and write replica; layer DAX within a Region if that Region also needs microsecond reads.

Pitfall 3: Forgetting Global Tables Are Eventually Consistent Across Regions

Mistake: Assuming a write in one Region is instantly readable with strong consistency in every other Region.

Why it fails: Global Tables replicate asynchronously through Streams, so cross-Region propagation is eventually consistent (usually within a second) and strong consistency is a single-Region guarantee only.

Correct Approach: Design for eventual cross-Region consistency, route writes for the same key to one Region, and rely on last-writer-wins only when concurrent multi-Region writes are unavoidable.

Pitfall 4: Creating a Global Table Without Enabling Streams

Mistake: Trying to add a replica Region without DynamoDB Streams turned on.

Why it fails: Global Tables rely on Streams as the replication mechanism, so the table cannot join a Global Table until Streams is enabled with the new and old images view type.

Correct Approach: Enable DynamoDB Streams (NEW_AND_OLD_IMAGES) before adding replica Regions.


Test Your Knowledge

Q

A read-heavy product catalog API on DynamoDB serves the same popular items repeatedly and needs microsecond response times with minimal code change. The reads can tolerate slightly stale data. What should the architect add?

AEnable Global Tables in a second Region
BPut a DynamoDB Accelerator (DAX) cluster in front of the table
CSwitch all reads to strongly consistent reads
DIncrease the table provisioned read capacity only
Q

A company has users in North America, Europe, and Asia and wants each region to read and write to a local copy of a DynamoDB table with low latency, while also surviving a full Region outage. Which feature meets this need?

AA DAX cluster spanning multiple Availability Zones
BDynamoDB Global Tables across the three Regions
CA read replica in each Region
DStrongly consistent reads from a single Region
Q

An architect enables DAX for a workload, but a subset of requests that use strongly consistent reads still show single-digit millisecond latency instead of microseconds. What explains this?

ADAX caches only write operations and leaves reads uncached
BStrongly consistent reads bypass the DAX cache and go directly to the table
CThe DAX cluster needs Global Tables enabled first
DDAX requires DynamoDB Streams to serve reads


Quick Reference

Limits and Facts

DynamoDB Acceleration and Replication Facts

ItemValue
DAX cached read latencyMicroseconds
Direct DynamoDB read or write latencySingle-digit milliseconds
DAX nodes per clusterUp to 11
DAX production minimum for high availability3 nodes across Availability Zones
DynamoDB Streams retention24 hours
Global Tables replication consistencyEventually consistent across Regions
Global Tables conflict resolutionLast-writer-wins by timestamp
Streams required for Global TablesYes (NEW_AND_OLD_IMAGES)

Common CLI Commands

SHDAX, Streams, and Global Tables CLI
# Create a DAX cluster across subnets
aws dax create-cluster \
  --cluster-name catalog-dax \
  --node-type dax.r5.large \
  --replication-factor 3 \
  --iam-role-arn arn:aws:iam::123456789012:role/DAXServiceRole \
  --subnet-group-name dax-subnets

# Enable DynamoDB Streams on a table (required before Global Tables)
aws dynamodb update-table \
  --table-name Orders \
  --stream-specification StreamEnabled=true,StreamViewType=NEW_AND_OLD_IMAGES

# Add a replica Region to make the table a Global Table
aws dynamodb update-table \
  --table-name Orders \
  --replica-updates '[{"Create": {"RegionName": "eu-west-1"}}]'

# Describe a Global Table replica configuration
aws dynamodb describe-table --table-name Orders \
  --query "Table.Replicas"

Further Reading

Related services

DynamoDBDAX