Comparison
Cache stampedevsHot key
Cache stampede
the popular key expired and ten thousand requests all missed at the same instant and went straight through to the database.
When a hot entry expires or is evicted, every concurrent request for it misses and recomputes it at once, and the load the cache was absorbing arrives at the origin in a single spike. The database being fine at steady state tells you nothing about whether it survives this. The fixes are a lock or single-flight around the recompute, early probabilistic refresh, or serving stale while one request refreshes.
Full entry →Hot key
one key gets so much traffic that the single node holding it is saturated while the rest of the cluster sits idle.
A single key or partition receiving a disproportionate share of requests, so that sharding does not help: the load lands on one node regardless of how many you add. Typical causes are a celebrity record, a global counter, or a partition key with low cardinality. The mitigations are key splitting, a local cache in front of the shared one, or request coalescing.
Full entry →