troubleshooting Data & storage
Hot partitions and shard-key skew
Two shards can own two keys each yet receive 100 requests on one and 20 on the other. Follow one popular key to see why moving it changes the busy shard without dividing its demand.
What it means
Two shards can own the same number of keys and receive very different numbers of requests. A shard is a partition of the data; its key count tells you how many keys it owns, not how often anyone asks for them. If every request for one popular key goes to its owner, moving the key changes which shard receives those requests. It does not split them.
Try it
Simulation: compare four keys on two shards over one observation window. Start with balanced-keys and evidence provided. One key receives 90 requests; each of the other three receives 10. Shard A owns the popular key and one other, so it gets 90 + 10 = 100 requests. Shard B also owns two keys, but it gets 10 + 10 = 20 requests.
Hot partitions and shard-key skew
Distinguish even key count from even request load across shards
Even key counts or key movement can still leave one shard with hot-key demand.
Placement
- Hot key locationA
- A key count2
- B key count2
- Total requests120
The hot key swaps shards with a normal key. Key counts remain equal; the request total is conserved. No shard capacity or latency is measured.
Evaluated inputs
- Required scenario evidence
- provided
- Placement
- balanced-keys
- Requests for hot key
- 90 count
- Requests per other key
- 10 count
Four keys on two shards, swap hot and normal, no replication, caching or actual service metrics.
About this model
The controls set only a local, bounded scenario. The computed branch is not a verdict about a live system. Inputs listed as not evaluated did not participate in this branch after validation.
Reset restores the original inputs. It does not change the open or closed state of help or FAQ answers.
- Keep the counts fixed and change Placement to
move-hot. This swaps the popular key on A for an ordinary key on B. Read the shard totals: A now gets 20 requests and B gets 100. Both still own two keys. - Select Reset to restore the starting counts, placement and evidence. Now change Requests for hot key from 90 to 10. This time the owners stay the same, but A and B each get 20 requests. It was the difference in demand, not the number of keys, that produced the original gap.
Use whole request counts from 0 to 1000. A missing or fractional count is an input error, not zero. With valid inputs, setting Required scenario evidence to missing gives an unknown result: the simulation does not use the selected counts or placement to calculate loads. Reset returns to the 100-versus-20 example.
Why moving the key is not enough
Think of each key as carrying its requests with it. In the starting example there are 120 requests, so an even split would be 60 per shard. The popular key alone accounts for 90. Whichever shard owns it is already above 60 before you count a single request for its neighbor. Moving whole keys cannot produce a 60–60 split in that window.
This is the distinction between distributing ownership and distributing activity. For example, the original Dynamo design uses virtual nodes to spread ownership and to give machines of different capacities different shares. That placement mechanism does not tell you which keys people will request most. The simulation illustrates the distinction; it does not implement Dynamo or predict DynamoDB partition placement.
An equal count of keys is invariant under the modeled swap. If the hot-key weight is changed to the same value as a normal key, both shard request counts become equal too. This is a useful control case: the model has not altered capacity, so it cannot tell you whether either shard can serve that demand.
In practice
If one partition appears busier than another, start with the interval in which you saw the symptom. Does it own more keys with similar request counts, or does one of its keys account for much of the traffic? Compare requests per key in that interval and, where ownership is known, add them up by partition. The totals show where requests went; the per-key counts show whether moving a particular key would move much of that demand with it.
A high request count is not proof of overload. If the symptom was throttling or slow reads, compare the key activity with throttling or latency observations from the same interval. For DynamoDB, operation size and read consistency also matter to capacity accounting. The simulation counts requests only: it has no capacity limit, cache, replicas or service measurements.
If you cannot connect the observed symptom to particular keys or partitions, stop at “cause unknown.” Do not change routing or move data on the strength of this example. The useful next observation is how much of the affected partition’s demand belongs to one key. An even-looking inventory cannot answer that question, and a new owner for the same indivisible key is not a new way to share its requests.
Frequently asked questions
Editorial questions based on the listed sources and explicitly labeled local examples.
Can adding shards solve one hot key?
Not if it remains indivisible and uncached.
Does hashing balance request rate?
It distributes key placement, not necessarily popularity.
What evidence identifies skew?
For DynamoDB, Contributor Insights can report heavily accessed or throttled keys, depending on its configured mode. Compare that evidence with request rate, size and observed latency over matching intervals. Merely counting distinct keys cannot show whether one is hot.
Can replication help reads?
Potentially, when the application can direct reads to replicas that satisfy its consistency requirements. Replication does not guarantee extra capacity for a particular hot partition. DynamoDB global tables have different multi-Region consistency modes; observe the actual routing and capacity. This model does not simulate replicas.
Sources & model boundaries
Primary references used for this explanation. The interactive example is an educational model, not a live check.
- Dynamo: Amazon’s Highly Available Key-value Store
§4.2, partitioning and virtual nodes. Dynamo uses virtual nodes to spread ownership and account for unequal machine capacities. This concerns placement, not a promise that an indivisible hot key can be served by multiple partitions.
Checked .
- DynamoDB partition key design
partition key design. Uniform activity across partition keys matters; capacity accounting uses operation size and read consistency, not key count alone.
Checked .
- DynamoDB Contributor Insights
Contributor Insights: accessed and throttled keys. Contributor Insights can report heavily accessed or throttled keys, depending on configured mode. Distinct-key counts alone do not identify a hot key.
Checked .
- DynamoDB read consistency
Global tables read consistency. Global tables have distinct multi-Region consistency modes. Replication does not guarantee increased capacity for a particular overloaded partition.
Checked .