What a hot partition is
When data is split by a partition key, traffic should spread evenly. A hot partition happens when one key or one narrow range receives far more traffic than the rest, so a single shard saturates while others sit idle. A celebrity user or a viral item is the classic cause.
Ways to cool it down
- Salting appends a small random or hashed suffix to the key so a single logical entity spreads across many physical partitions. Reads then fan out across the suffixes.
- Splitting detects the hot range and divides it into smaller ranges across more shards.
- Caching serves the hot key from an in memory layer so most reads never touch the shard at all.
- Write sharding spreads writes for a counter across buckets that are summed on read.
The tradeoff
Spreading a key improves throughput but complicates reads, because you must gather and merge all the pieces. Choose a partition key with high cardinality and even access from the start to avoid the problem.
Key idea
A hot partition concentrates load on one shard, so we salt, split, or cache to spread the heat at the cost of more complex reads.