Q35: What is a hot key or hot partition, and how do you address it?

Difficulty:AdvancedTopic:Scalability

A hot key receives disproportionate traffic, overloading one cache node, shard, or partition. Diagnose it with per-key or per-partition metrics. Options include caching, request coalescing, splitting counters into multiple buckets and aggregating them, salting keys, or changing the partition strategy. Each option affects consistency or query complexity, so do not randomly repartition without understanding the access pattern.

Key Takeaways
  • Aggregate traffic distribution, not only total throughput.
  • Mitigations may trade exactness or simplicity for load distribution.