DynamoDB interview question · Most asked
How does DynamoDB partition data, and what limits apply per partition?
Summary
DynamoDB hashes the partition key to place items on partitions (storage units of up to about 10 GB). Each partition supports up to 3,000 read capacity units and 1,000 write capacity units per second. Tables split partitions automatically as data or traffic grows.
Longer Answer
Because limits are per partition, a table with huge total capacity can still throttle if one partition key receives a disproportionate share of traffic. DynamoDB mitigates this with adaptive capacity (shifting capacity to hot partitions) and split for heat (splitting busy partitions, which only helps if traffic is spread across sort keys rather than a single item). A single item can never exceed those per-partition limits.
Key Points
- Hash of PK chooses the partition.
- ~10 GB, 3,000 RCU and 1,000 WCU per partition.
- Automatic splits; adaptive capacity.
- A single hot key is still capped.
More most-asked DynamoDB questions
- What is DynamoDB, and what workloads is it a good fit for?
- What are DynamoDB Streams, and how are they used?
- What is a hot partition, and how do you avoid one?
- How do you approach data modelling in DynamoDB, and how is it different from relational design?
- Explain partition keys, sort keys and the two kinds of primary key.
- Global secondary index or local secondary index: what is the difference?
- Query or Scan: what is the difference, and why avoid Scan?
- How do conditional writes work, and how do you implement optimistic locking in DynamoDB?