Scalability and Performance · Remembering answers
Cache stampedes
When a popular cache entry disappears, every request that arrives during the rebuild misses and asks the database for the same thing. Coalescing, jitter, early refresh and stale copies stop the herd.
- Time22 min
- LevelDeveloper
- Experiments1 live
- Check6 questions






First request misses, wins the lock and starts the rebuild.
Other requests see the lock and get the stale copy immediately.
Database runs the product query once.
Cache stores the new value with a jittered TTL.
Next requests hit the fresh value; the database never saw a herd.
CDN edge collapses identical misses; honors
Reverse proxy NGINX
App server single-flight per process, jittered TTLs, early refresh.