awesome-everything RU
↑ Back to the climb

Caching

Cache stampede: free-recall review

Crux Free-recall prompts across the stampede unit. Answer each in your own words first, then reveal the model answer and compare.
Your altitude — climbing toward senior
ZeroJuniorMiddleSenior
You are at senior altitude — in orbit
◷ 13 min

Retrieval beats re-reading. For each prompt, say or write a full answer from memory before you open the model answer — the effort of recall is what makes the mechanisms stick when you are the one paged at 3am.

Goal

Reconstruct the unit’s spine without looking back: why the burst is the failure, where single-flight and a lock each bound the herd, why XFetch is coordination-free, what SWR trades away, why negative caching matters, and how a stampede becomes a metastable failure.

Recall before you leave
  1. 01
    Why does a cache make the failure mode worse than no cache at all, even though total request volume is lower?
  2. 02
    Contrast in-process single-flight with a Redis distributed lock: what each bounds, what each costs, and the order to apply them.
  3. 03
    How does XFetch achieve 'expected exactly one early refresh per TTL window' with no coordination, and when does it fail?
  4. 04
    What does stale-while-revalidate guarantee at a TTL boundary, what does it trade away, and how does CDN request coalescing extend it?
  5. 05
    What is negative caching, and what attack does its absence enable?
  6. 06
    Describe the metastable failure that can follow an unmitigated stampede and why the system cannot self-recover.
Recap

If you reconstructed each answer from memory, you hold the unit’s spine: the burst is the failure (not the volume), single-flight bounds the per-process herd and a lock bounds the per-fleet herd, XFetch refreshes hot keys before expiry with no coordination (and fails on cold keys), SWR buys zero wait at the price of bounded staleness, negative caching closes the miss-storm amplification hole, and an unmitigated stampede can tip into a metastable retry storm that only an external kill signal can break.

Continue the climb ↑Cache stampede: code reading
shortcuts expand
search
K
prev piece
k
next piece
j
cycle tier
t
this menu
?
sources3
expand
  1. 01
  2. 02
  3. 03

Trademarks belong to their respective owners. Editorial reference only.