DynamoDB Hot Partition That Throttled a Flash Sale
A product ID used as the DynamoDB partition key concentrated 80% of flash-sale reads on a single partition, causing sustained throttling.
Overview
A flash sale for one limited-edition sneaker sent every read to a single DynamoDB partition at more than twice its limit, and product pages failed for all users.
What happened
The catalog table used product_id as the partition key. DynamoDB hashes the partition key to choose the partition that stores an item, so every read of one product_id goes to the same partition. The hero product's item was read by three different sources at once, and all of them landed there.
Key concepts
- Hot partition
- Partition key design
- Write sharding
- DAX (DynamoDB Accelerator)
Interview questions
- How do you redesign a DynamoDB product catalog to handle flash-sale access patterns without hot partitions?
Sign up free to read the full topic
More War Stories topics
- AWS Credentials Committed to a Public GitHub Repository
- Backups That Were Never Actually Completing
- BGP Route Leak That Rerouted Traffic Through an Unexpected AS
- Blue-Green Deployment That Resulted in Split-Brain Sessions
- Cache Stampede on a Flash-Sale Product Page
- Connection Pool Exhaustion That Brought Down 12 Microservices
- Failover to a Lagging Replica Lost 4 Minutes of Orders
- Internal DNS Cache Poisoning That Redirected API Traffic
- Malicious npm Package Exfiltrated Environment Variables at Build Time
- N+1 Query Pattern That Collapsed Under Load
- NAT Gateway Port Exhaustion Under Bursty Lambda Traffic
- Node.js Memory Leak That Required Daily Restarts
Start free on Cariara · Coding problems · System design studio