⚡ ~/naveed Interview Prep
⚡ Portfolio Home 👤 About Naveed Bio & Credentials 📫 Contact Naveed Get In Touch ✍️ Engineering Blog Deep Dives 🎯 Interview Hub 1,000+ Scenarios ☸️ Kubernetes Mastery Hub 24 Modules 🎮 DevOps Arcade & Quizzes Subnet Blitz ⚡ 🗺️ DevOps Roadmaps PDFs & Guides 🤖 Morpheus Analysis AI Quant ↗ 🛠️ Developer Tools Utilities 🧪 Labs & Experiments 📄 Interactive CV & Certs 🔗 All Links & Socials ⚡ Join The Dispatch (Weekly SRE Newsletter) →
← Back to All Databases & Storage Interview Questions Scenario 48 of 54 in Databases & Storage
Senior Cloud Architect Database AWS Aurora & DynamoDB NoSQL Architecture
🎯 Target Role / Context: Senior Cloud Solutions Architect / SRE Interview Scenario

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.

#AWS #DynamoDB #Hot Partitions #GSI #Throttling #Partition Keys #NoSQL
🎙️ Candidate Opening & Architectural Context
"Amazon DynamoDB distributes data across storage partitions based on the hash of the Partition Key (PK). Each individual physical partition is capped at 1,000 Write Capacity Units (WCUs) and 3,000 Read Capacity Units (RCUs). When workload traffic is skewed toward a single partition key (a 'hot partition'), throttling occurs even if the overall table has unused provisioned capacity. Crucially, when an asynchronous Global Secondary Index (GSI) is throttled on writes, DynamoDB throttles writes on the base table to prevent the index from falling indefinitely behind."
Advertisement
⚡ Recommended Practice Lab

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

Direct Answer: Amazon DynamoDB distributes data across storage partitions based on the hash of the Partition Key (PK). Each individual physical partition is capped at 1,000 Write Capacity Units (WCUs) and 3,000 Read Capacity Units (RCUs). When workload traffic is skewed toward a single partition key (a 'hot partition'), throttling occurs even if the overall table has unused provisioned capacity. Crucially, when an asynchronous Global Secondary Index (GSI) is throttled on writes, DynamoDB throttles writes on the base table to prevent the index from falling indefinitely behind.

⚡

Situation: Throttling Despite Low Global Table Utilization

⚡

Task: Eliminate Hot Partitions & Balance GSI Provisioning

Advertisement
⚡

Action: Partition Key Salting & Sparse Index Optimization

⚡

Result: 100% Throttling Elimination & 65% Cost Reduction

💡 The Senior SRE Gold Nugget (Key Architectural Takeaway)
"DynamoDB partitions are individually limited to 1,000 WCU / 3,000 RCU regardless of total table provisioning. Use key salting for hot keys, sparse GSIs to limit index write volume, and remember that throttled GSIs will backpressure base table writes."
⚡ 60-Second Elevator Pitch Talking Points
  • 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.
⛔ Critical Candidate Mistakes to Avoid in This Scenario

Senior hiring managers and bar raisers evaluate how you prioritize during outages. Avoid these common anti-patterns:

  1. Using a low-cardinality partition key (e.g., status, boolean, date) in high-throughput DynamoDB tables Low-cardinality partition keys route disproportionate request volume to single storage nodes, triggering ProvisionedThroughputExceededException throttling.
  2. Neglecting GSI write throttling backpressure on primary DynamoDB table write operations If a GSI lacks sufficient WCU capacity, backpressure from the secondary index throttles writes on the primary table regardless of base table provisioning.
  3. Omitting exponential backoff and jitter algorithms in client SDK retry configurations during DynamoDB throttling Retrying throttled calls in lockstep causes synchronized retry storms that compound partition exhaustion instead of letting the partition drain.
  4. Failing to monitor CloudWatch ThrottledRequests and Contributor Insights during DynamoDB latency spikes when configuring Amazon DynamoDB Partition Senior SREs use Contributor Insights to pinpoint the exact partition keys and access patterns causing throttling rather than relying on average latency metrics.
Advertisement
Want more Databases & Storage scenarios?
Explore our complete collection of scenario-based Databases & Storage interview runbooks.
Browse All Databases & Storage Questions →