recall

← recall

cache stampede pattern

When a popular cached value expires and many concurrent requests all see the miss simultaneously, they all hit the origin at once. Distinct from thundering herd: stampede is on the cache miss path itself.

When a popular cached value expires and many concurrent requests all see the miss simultaneously, they all hit the origin at once. Distinct from thundering herd: stampede is on the cache miss path itself.

symptoms

  • origin spike correlating with cache TTL boundaries
  • tail latency on miss path

causes

  • popular cache key with hard TTL
  • no single-flight on the origin call

fixes

  • single-flight (one origin call per key, others wait)
  • stale-while-revalidate
  • randomized TTL
  • pre-warm popular keys

you might say

  • stampede on miss
  • cache miss storm

related

aliases: dogpile

topics: caching, failure-modes