open atlas
↑ Back to track
System Design Case Studies SDC · 01 · 05

Foundational cases: multiple-choice review

Multiple-choice synthesis across the foundational case studies: the KV store's quorum, the shortener's read:write ratio and redirect status, the crawler's frontier and dedup, and the message queue's ordering and delivery semantics.

SDC Senior ◷ 13 min
Level
FoundationsJuniorMiddleSenior

Six questions that cut across the four case studies. Each is a decision you make at a whiteboard — which quorum setting, which short-code scheme, why the frontier is two-stage, which delivery semantics — not a definition to recite.

Confirm you can pick the quorum that gives read-your-write, read the shortener’s read:write ratio and choose its redirect status, explain why the crawler frontier separates priority from politeness, and name the delivery semantics from where the offset is committed.

Quiz

A Dynamo-style store runs N=3. A client must be able to read back a value it just wrote, using a strict quorum. Which R/W setting is the minimal one that guarantees it?

Quiz

Your URL shortener earns money from click analytics. An engineer switches redirects to 301 to 'cut server load.' What breaks, and what's the right status?

Quiz

A crawler pulls URLs strictly by priority from a single queue and keeps DDoSing individual sites. Why, and what fixes it?

Quiz

You need a user's events processed in order in a Kafka-like log with many partitions. What guarantees that, and what's the trap?

Quiz

A consumer commits its offset AFTER processing each message. The process crashes after a side effect but before the commit. On restart, what happens?

Quiz

A crawler's exact seen-URL set would need ~1 TB of RAM. You swap in a bloom filter. Which statement is correct?

Recall before you leave
  1. 01
    What quorum gives read-your-write at N=3, and why?
  2. 02
    Why is the crawler frontier two-stage, and what does at-least-once force on a consumer?
Recap

The through-line across the four cases is that each is the same handful of moves applied to a new shape. The KV store is a quorum decision: R + W > N (e.g. W=2,R=2 at N=3) guarantees a read overlaps the latest write. The URL shortener is a read:write read: ~100:1 means the redirect path is everything, and the 301-vs-302 status trades load for analytics/control (302 when clicks are the product). The crawler is a two-stage frontier (priority in front, one-host-per-back-queue politeness in back) plus a bloom filter (no false negatives, tunable false positives) and content hashing for the duplicates URLs can’t catch. The message queue is a partitioned log: a stable partition key keeps a user’s events ordered (order is per-partition only), and offset-commit timing sets the delivery semantics — commit after processing is at-least-once, so consumers must be idempotent. Recognise the move and the design writes itself.

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.