Building blocks: free-recall review
Free-recall prompts across the building-blocks unit. Answer each in your own words first — including the mechanism and the failure mode — then reveal the model answer and compare.
Retrieval beats re-reading. For each prompt, say or write a full answer from memory — the mechanism AND the failure mode it guards against — before you open the model answer. The effort of reconstruction is what makes these building blocks stick.
Reconstruct the unit’s spine without looking back: the rate-limiter algorithms and the distributed-counter race, why auto-increment fails at scale and what replaces it, the bloom filter’s one-sided guarantee, how geohash proximity works and where it breaks, and how leader election goes wrong and what fixes it.
- 01Compare the four rate-limiter algorithms, and explain the distributed-counter race and its fix.
- 02Why does auto-increment fail at scale, and how do UUIDv4, Snowflake, and UUIDv7 differ?
- 03State the bloom filter's guarantee, the mechanism, and where it must not be used.
- 04How does geohash proximity work, and what is the boundary problem and its fix?
- 05When do you need leader election, what's split-brain, and why is a fencing token the fix?
If you could reconstruct each answer from memory, you hold the unit’s spine. The rate limiter: token/leaky bucket smooth bursts, fixed windows spike 2× on the boundary, sliding windows fix it, and the distributed-counter race needs an atomic increment-and-check (fail open, reject with 429). ID generation: auto-increment fails at scale (central bottleneck or per-shard collisions), so use a time-ordered scheme — Snowflake (64-bit) or UUIDv7 (128-bit) — which is sortable and index-friendly but leaks time and depends on the clock. The bloom filter: no false negatives, a tunable false-positive rate, ~10 bits/element for ~1%, no deletion (counting/cuckoo), and never the sole authority for a harmful ‘yes.’ Geohashing: prefix ≈ proximity for an indexed scan, but the boundary problem forces querying the cell plus its 8 neighbours. Leader election: consensus or a lease, with split-brain defeated only by a fencing token at the resource — never a longer timeout. The thread: reach for the right block, then get its subtle correctness core right.
Something unclear?
Ask a question about this lesson. Questions are anonymous and go straight to the author to make the lesson better.