Caching DynamoDB Reads with DAX
This lesson explains how DynamoDB Accelerator (DAX), an in-memory cache for DynamoDB, cuts read latency from milliseconds to microseconds with almost no application changes.
Learning outcomes
After completing this lesson, you will be able to:
- Describe how DAX works as a write-through cache.
- Decide when DAX helps and when it does not.
How DAX works
DynamoDB Accelerator (DAX) is an in-memory, write-through cache cluster that runs in the customer's VPC in front of one or more DynamoDB tables, reducing read latency from milliseconds to microseconds. It is API-compatible with DynamoDB through the DAX client, so applications change only the client they use, not their queries.
DAX keeps an item cache for GetItem results and a query cache for Query and Scan results, each with a time to live. Clusters span several Availability Zones for availability. DAX suits read-heavy workloads with repeated reads of the same items, but not workloads that require strongly consistent reads, which DAX passes through to DynamoDB.
The following diagram shows the read and write paths through DAX.

When DAX helps
DAX is an in-memory cache built for DynamoDB: an application switches to the DAX client, and reads are answered from memory in microseconds. It helps read-heavy workloads that read the same items repeatedly, applications that need microsecond latency, and tables where a few popular items consume a large share of read capacity.
DAX does not help everywhere. Strongly consistent reads bypass the cache and go to DynamoDB. Writes pass through DAX to the table, so it does nothing for write-heavy workloads or write throttling. It caches only DynamoDB responses, so results computed from several sources belong in ElastiCache. The following table summarises when DAX helps.
| Helps | Does not help |
|---|---|
| Read-heavy workloads with repeated reads of the same items | Strongly consistent reads, which pass through to DynamoDB |
| Microsecond latency requirements | Write-heavy workloads or write throttling |
| Reducing read capacity on hot items | Caching computed results from several sources (use ElastiCache) |
DAX or not?
Microsecond reads for a product catalogue
DAX improves performance only for certain access patterns. The following table assesses several requirements and indicates whether DAX is suitable for each.
| Requirement | Fits DAX? |
|---|---|
| Product details read thousands of times a second during sales | Yes: repeated eventually consistent reads served from memory |
| Account balances that must always be current | No: strongly consistent reads bypass DAX |
| A write-heavy telemetry table | No: DAX does not speed up writes |
| Minimal code change | Yes: replace the DynamoDB client with the DAX client |
The catalogue service adds a three-node DAX cluster across AZs in its VPC, cutting read latency to microseconds and the table's read capacity sharply.
Does DAX help a write-heavy workload?
Show answer
No. DAX caches reads, giving microsecond response times for repeated reads; writes still go to DynamoDB.
Exam Tips
Remember for the exam
- For microsecond read latency for DynamoDB, use DAX.
- DAX does not help write-heavy workloads or strongly consistent reads.
- To cache DynamoDB reads with minimal code changes, use DAX rather than ElastiCache.