open atlas
↑ Back to track
System Design Foundations SD · 08 · 07

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.

SD Senior ◷ 14 min
Level
FoundationsJuniorMiddleSenior

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.

Recall before you leave
  1. 01
    Compare the four rate-limiter algorithms, and explain the distributed-counter race and its fix.
  2. 02
    Why does auto-increment fail at scale, and how do UUIDv4, Snowflake, and UUIDv7 differ?
  3. 03
    State the bloom filter's guarantee, the mechanism, and where it must not be used.
  4. 04
    How does geohash proximity work, and what is the boundary problem and its fix?
  5. 05
    When do you need leader election, what's split-brain, and why is a fencing token the fix?
Recap

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.

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.