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

Building blocks: multiple-choice review

Multiple-choice synthesis across the building-blocks unit: the rate-limiter race, time-ordered vs random IDs, the bloom filter's one-sided guarantee, the geohash boundary problem, and the split-brain that fencing tokens defeat.

SD Senior ◷ 13 min
Level
FoundationsJuniorMiddleSenior

Five questions that cut across the whole unit. Each is a decision you make when you reach for an off-the-shelf mechanism — a limiter, an ID scheme, a membership filter, a spatial index, a coordinator — and get the subtle part right instead of the obvious part.

Confirm you can spot the distributed-counter race, pick a time-ordered vs random ID for the situation, reason from the bloom filter’s no-false-negatives guarantee, defeat the geohash boundary problem, and make split-brain harmless with a fencing token.

Quiz

A rate limiter runs on 40 servers, each doing GET-counter → check < limit → SET counter+1 against shared Redis. Clients exceed their limit under load. What's the minimal correct fix?

Quiz

A clustered-index OLTP table ingests millions of rows/hour and you need decentralized ID generation across regions without fragmenting the index. Which ID scheme fits best?

Quiz

You want to guard an expensive database read with a bloom filter, but a teammate worries a wrong answer could cause harm. When is the filter safe to use here?

Quiz

A 'drivers near me' query selects only the rider's own geohash cell and misses a driver parked 20 m away across the street. What's the fix?

Quiz

A leader takes a lock, suffers a long GC pause past its lease, a new leader is elected, and the old one wakes up still acting as leader. Both write. What actually prevents corruption?

Recall before you leave
  1. 01
    Why does a distributed rate limiter overshoot, and what's the one-line fix?
  2. 02
    When is a bloom filter safe, and when is it not?
  3. 03
    State the fencing-token rule that defeats split-brain.
Recap

The through-line of the unit is that each building block has an obvious surface and a subtle correctness core. A rate limiter is trivial on one node but races on a fleet — the fix is an atomic increment-and-check on one shared counter (and fail open if it’s down). ID generation is trivial with one writer but needs a time-ordered scheme (Snowflake/UUIDv7) to stay coordination-free without fragmenting the index. A bloom filter is a fast membership pre-check that is safe only where a false positive is cheap, because it guarantees no false negatives but not no false positives. Geohashing turns proximity into a prefix scan but must query the cell plus its 8 neighbours to beat the boundary problem. And leader election is easy until split-brain, which no timeout can prevent — only a fencing token enforced at the resource makes a stale leader harmless. Get the subtle part, not just the obvious part.

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.