Q: A serverless microservice using DynamoDB is throttled with 'ProvisionedThroughputExceededException', even though total consumed capacity is only 25% of the provisioned table limits. Investigation reveals 95% of traffic queries a single partition key ('Status = PENDING'). Furthermore, an asynchronous Global Secondary Index (GSI) has reached write capacity limits and is backpressuring the main table. How do you re-architect the partition key scheme and mitigate GSI write throttling?
Solve DynamoDB ProvisionedThroughputExceededException throttling caused by asymmetric partition key distribution and asynchronous Global Secondary Index write backpressure.
Want to master this scenario in a live sandbox? KodeKloud's PostgreSQL Database Administration & High Availability Course covers this exact problem with hands-on terminal drills.
🛠️ Production Runbook & Step-by-Step Resolution
Situation: Throttling Despite Low Global Table Utilization
Task: Eliminate Hot Partitions & Balance GSI Provisioning
Action: Partition Key Salting & Sparse Index Optimization
Result: 100% Throttling Elimination & 65% Cost Reduction
- DynamoDB partitions have a hard limit of 1,000 WCU and 3,000 RCU each.
- A single hot partition key or a throttled GSI will throttle writes to the entire base table.
- Apply write salting (partition sharding) and sparse GSIs to distribute throughput and eliminate backpressure.