awesome-everything RU
↑ Back to the climb

Caching

Dogpile: free-recall review

Crux Free-recall prompts across the dogpile unit. Answer each in your own words first, then reveal the model answer and compare on the lock, lease, and XFetch mechanics.
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 lock-and-lease mechanics stick when you are paged at 3am.

Goal

Reconstruct the unit’s core mechanisms — the expiry-instant collision, single-flight vs distributed locking, lock TTL and lease renewal, fencing, and XFetch — without looking back at the lesson.

Recall before you leave
  1. 01
    Why is the dogpile specifically a concurrency-at-expiry problem, and why is a single hot key the worst case?
  2. 02
    What is the difference between a local single-flight and a distributed lock, and when do you need each?
  3. 03
    Why must a recompute lock have a TTL, and how do you choose it?
  4. 04
    Explain lease renewal: what problem it solves and what new failure it introduces.
  5. 05
    What is a fencing token and why does it matter for a leased recompute lock?
  6. 06
    When do you choose probabilistic early expiration (XFetch) over a lock, and how does it work?
Recap

If you could reconstruct each answer from memory, you hold the unit’s spine: the dogpile is the collision in the gap between first-miss and value-rewritten on one hot key; single-flight coalesces per process while a distributed lock coalesces the fleet; a lock needs a TTL longer than the worst-case recompute or, better, a renewed lease; a leased lock still needs a fencing token because a paused holder can lapse and then overwrite; and XFetch dissolves the collision entirely by recomputing early and alone before the key ever expires under load.

Continue the climb ↑Dogpile: code and lock 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.