All faults / Data & state

Cache stampede: chaos experiment

A hot cache key expires and every request that arrives misses at once. They all recompute the same value against the database.

What it tests
request coalescing, stale-while-revalidate, expiry spread, database headroom
The hypothesis holds when
Request coalescing lets one caller recompute while the rest wait or serve a stale copy, so the database sees one query.
It breaks when
Every miss hits the database together. It slows down, the slow answers keep the cache empty, and the stampede lasts.

The same fault in other tools

Generated manifests and commands are on the Export tab. Confirm flags for your version before running them.

Run this experiment in your browser

Simulator only today. Export it as a manifest from the Export tab.