Every source behind this page, graded. The ledger with per-claim quotes ships
alongside as sources.md.
Postmortem
Facebook2010-09
More Details on Today's Outage
The canonical cache-stampede incident: an automated repair path deleted keys on every
database error, sustaining hundreds of thousands of queries per second after the root
cause was fixed. Recovery meant turning the site off.
Carry forwardThe repair path is a miss path; give it the same election and rate limits.
engineering.fb.com
Postmortem
Slack2022
Slack's Incident on 2-22-22
A Consul upgrade made cache nodes rejoin empty at daily peak; misses fell onto a
cross-shard scatter query and Vitess cascaded. A complete anatomy of a control-plane
triggered stampede.
Carry forwardCache management actions are load events; schedule and bound them like deploys.
slack.engineering
Postmortem
Wikimedia2020-02
Incidents/2020-02-04 app server latency
Public incident doc with the rare thing: exact hit-ratio and latency numbers. A 52% hit
ratio on one key family for nine minutes multiplied site-wide p75 latency by 5 to 13.
Carry forwardPlan origin and worker capacity for the worst tolerated hit ratio, not for average.
wikitech.wikimedia.org
Source
memcachedmaster, 2026
doc/protocol.txt: meta commands
Mainline memcached's lease semantics, in the protocol itself: N and R flags let one
client "win" the recache, W/X/Z tell everyone else to serve stale, retry or wait. Written
against "dog piling" by name.
Carry forwardYou no longer need Facebook's fork; the anti-stampede protocol is in stock memcached.
github.com/memcached
Source
Google2013
golang/groupcache README
The design document for library-side coalescing: one load per replicated process set,
multiplexed to all callers, with automatic mirroring of super-hot keys. Deliberately no
delete, no expiry, no versioned values.
Carry forwardCoalescing plus hot-key replication covers reads; the features it refuses are the invalidation problems it avoids.
github.com/golang/groupcache
Source
Google2013
singleflight/singleflight.go
The whole election mechanism in about 60 lines: a mutex, a map of in-flight calls, a
WaitGroup. Duplicate callers wait and share the winner's result and error.
Carry forwardNote it shares errors too: one failing recompute fails every waiter. Decide if that is what you want.
singleflight.go
Source
Railsmain, 2026
ActiveSupport::Cache race_condition_ttl
Serve-stale-while-one-regenerates as a single fetch parameter, in a mainstream framework
since 2011: bump the expired entry's TTL, let one process regenerate, others read the
stale value. The doc comment names the dog pile effect.
Carry forwardThe API shape to copy: staleness budget as an explicit caller-supplied number.
rails/activesupport/cache.rb
Source
Twitter2020-03
twitter/cache-trace
A week of production traces from 54 cache clusters, 14 TB uncompressed, CC-BY. The only
public dataset large enough to test a stampede-protection design against real key
popularity and TTL distributions.
Carry forwardBenchmark your miss protocol against these traces before trusting a synthetic load test.
github.com/twitter/cache-trace
Source
Go project2022, open
golang/go #53427: generic singleflight
The proposal to add type parameters to singleflight, still open with no attached PRs.
Thirteen years in, the de-facto standard coalescer remains in x/sync with an interface{}
API that the community keeps re-wrapping.
Carry forwardExpect to own a thin wrapper; the ecosystem's primitive is stable but frozen.
github.com/golang/go/issues/53427
Decision record
IETF2010-05
RFC 5861: stale-while-revalidate, stale-if-error
The waiters' contract, standardized for HTTP: return the stale response immediately,
revalidate in the background, and serve stale on origin error to trade freshness for
availability.
Carry forwardTwo response-header tokens buy stampede resistance at every conforming cache between you and the user.
datatracker.ietf.org/rfc5861
Decision record
Wikimediachecked 2026
Memcached for MediaWiki: WANCache design
The most complete public write-up of invalidation discipline: purges are SETs of 11-second
tombstones because deletes race with stale repopulation under replication lag; 1-second
interim values absorb the regeneration herd.
Carry forwardThe tombstone TTL equals your replication lag budget; make both explicit.
wikitech.wikimedia.org
Paper
Facebook2013-04
Scaling Memcache at Facebook (NSDI '13)
Introduces leases, which solve stale sets and thundering herds with one token: issued at
most every 10 seconds per key, verified on set. Measured effect on one stampede-prone
workload: peak DB queries 17K/s down to 1.3K/s.
Carry forwardRate-limiting the right to recompute is the strongest lever in the corpus, and it lives server-side.
usenix.org, NSDI '13
Paper
Twitter / CMU2020-11
In-memory cache clusters at Twitter (OSDI '20)
153 production clusters analysed: TTL often defines the working set more than eviction
does, many workloads are write-heavy, and FIFO is a surprisingly strong replacement policy
in production.
Carry forwardYour TTL distribution is a first-class design artifact; audit it before tuning eviction.
usenix.org, OSDI '20
Paper
Vattani, Chierichetti, Lowenstein2015
Optimal Probabilistic Cache Stampede Prevention (VLDB '15)
XFetch: each reader recomputes early with probability rising near expiry, shifted by
delta·beta·log(rand()). No locks, no coordination, no tuning; the
exponential form is proven optimal.
Carry forwardTen lines of code that remove the synchronized expiry edge on steadily-read hot keys.
vldb.org, PVLDB vol 8
Eng blog
Instagram2019-04
Thundering Herds & Promises
Cache the in-flight computation: on a miss, insert a promise, and concurrent misses wait
on it instead of dialling the backend. Motivated by empty-cache cluster turn-up, the
cold-start herd in its purest form.
Carry forwardCaching the promise instead of the value collapses the herd inside one process with no server support.
instagram-engineering.com
Eng blog
DoorDash2018-08
Avoiding Cache Stampede at DoorDash
The multi-layer subtlety: an L1 in-process miss stampedes L2 and the database with
parallel duplicate reads even when L2 is healthy. Solved with a coroutine debounce
returning one shared Deferred per key.
Carry forwardEach cache layer needs its own coalescer; a healthy L2 does not protect itself from your L1 misses.
careersatdoordash.com
Eng blog
Discord2023-03
How Discord Stores Trillions of Messages
Request coalescing promoted to its own Rust tier between the API and ScyllaDB: first
request spawns a worker, later ones subscribe; consistent-hash routing by channel ID sends
a hot channel's requests to one coalescer.
Carry forwardAbove one language and one hot partition, the coalescer wants to be a service with a routing key.
discord.com/blog
Eng blog
Netflix2018-12
Cache warming: Agility for a stateful service
Replica warmer for scale-ups, instance warmer for replacements: EVCache nodes are filled
from live replicas before they take traffic, so the fleet's hit ratio never dips on a
topology change.
Carry forwardTreat "node enters serving" as a gated state transition, not a side effect of registration.
netflixtechblog.com
Eng blog
Netflix2021-11
Cache warming: Leveraging EBS for petabytes
The warming pipeline at scale: dumpers write to multi-attach EBS volumes, populators
stream into the new replicas. Warming is real infrastructure with its own controller,
queues and failure modes.
Carry forwardBudget warming as a data-transfer project: petabyte fleets cannot be refilled through the miss path.
netflixtechblog.medium.com
Eng blog
Madhur Ahuja2016-12
proxy_cache_lock and proxy_cache_use_stale, closely read
The practitioner account of nginx's defaults: with the lock on and use_stale off, every
request arriving during a refresh waits. The two directives only make sense enabled
together.
Carry forwardElection without a staleness valve is a latency wall; audit your proxy config for the pair.
madhur.co.in
Eng blog
Data Center Knowledge2010-09
Technical Details of Facebook Outage
Contemporary coverage fixing the blast radius of the 2010 incident: roughly 2.5 hours
down or unreachable, the worst outage in over four years.
Carry forwardCorroboration for the duration figure the postmortem describes qualitatively.
datacenterknowledge.com
Vendor
nginxchecked 2026
ngx_http_proxy_module: cache_lock, use_stale
The reference semantics: proxy_cache_lock admits "only one request at a time" to populate
an element; use_stale's updating parameter serves the stale copy during refresh. Both
default off.
Carry forwardThe defaults are the stampede; protection is opt-in and two directives wide.
nginx.org docs
Vendor
Varnish Softwarechecked 2026
Under the hood: waiting list and serialization
Varnish's coalescing queue, and its documented trap: uncacheable responses drain the
waiting list one at a time. Hit-for-pass exists to bypass the queue for objects known
uncacheable.
Carry forward"Do not cache" must be a cached fact, or your coalescer serializes.
docs.varnish-software.com
Vendor
Fastlychecked 2026
Request collapsing
CDN-scale coalescing is hierarchical: fetches for an object are focused through one cache
node per data center, and its queue lets a single request escape to origin.
Carry forwardA layer of shielding in front of your origin buys the election without touching application code.
fastly.com documentation
Talk
Netflix / Strange Loop2016-09
Caching at Netflix: The Hidden Microservice
Scott Mansfield's abstract puts numbers on the cache-as-a-service model: about 30 million
requests per second at peak, hundreds of billions of objects, tens of thousands of
memcached instances.
Carry forwardAt this scale the cache is a product with its own team; the miss protocol is its API contract.
thestrangeloop.com
Talk
Internet Archive / RedisConf2017-05
Preventing Cache Stampede with Redis and XFetch
Jim Nelson's talk ships with a public harness comparing fetch, locked, xfetch and
xlocked. Conclusion in the README: plain fetch and lock-only strategies "do not scale
well"; xfetch plus a lock had zero misses and no duplicate recomputes.
Carry forwardAn independent adopter reproducing the paper's result; the combination beats either primitive alone.
github.com/internetarchive/xfetch