Rejecting

Hot partitions and hot keys in DynamoDB, Cassandra and Kafka

Partitioned databases spread data across many partitions, each with its own throughput limit. If one key gets a large share of the traffic, its partition hits the limit even though the cluster as a whole is mostly idle.

What causes it

Capacity is per partition, not per table. A celebrity post, a global counter or a time-based key sends a big slice of requests to one partition. That partition throttles while the others have room to spare — adding nodes does not help, because the hot key still lives on one partition.

How to recognise it

The math

Hot partition load = λ × (hot key share + (1 − hot key share) ÷ partitions)

Error messages you will see

ErrorSeen in
ProvisionedThroughputExceededException (hot partition)Amazon DynamoDB

How to fix it

Reproduce it in the simulator

These templates trigger this failure on purpose:

Open the simulator

Learn more

Part of the guide Caching in system design.

Related failure modes