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.
SDCSenior◷ 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
Completed
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?
Heads-up R + W = 2 ≤ N = 3, so the read and write sets can be disjoint and the read can miss the new value. You need R + W > N; W=2,R=2 is the balanced minimal choice.
Heads-up That works but isn't minimal and kills availability (any node down blocks the op). R + W > N is the actual requirement, met by W=2,R=2 with far better availability.
Heads-up Replica count alone doesn't guarantee overlap; the relationship R + W > N does. With N=3, W=2,R=2 already guarantees the read sees the write, no extra replicas needed.
Quiz
Completed
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?
Heads-up 301 caches the mapping in browsers, so you stop seeing repeat clicks — fatal when clicks are the product — and you lose the ability to change or expire the link. 302 preserves both at the cost of serving every click.
Heads-up The redirect status has nothing to do with code uniqueness (that's set at generation). 301 breaks analytics and repointing because browsers cache the mapping; 302 is the fix.
Heads-up The analytics-preserving choice is 302 (temporary, not cached); 307 is a method-preserving temporary redirect, not the standard shortener answer. The core point is temporary (not cached) vs permanent (cached).
Quiz
Completed
A crawler pulls URLs strictly by priority from a single queue and keeps DDoSing individual sites. Why, and what fixes it?
Heads-up More threads make the hammering worse. The problem is no per-host rate limit — the fix is back queues (one host each, with a crawl-delay timestamp), not more concurrency.
Heads-up A bloom filter dedupes URLs; it doesn't pace requests to a host. Politeness comes from the frontier's back queues enforcing a per-host delay, a separate concern from dedup.
Heads-up Honoring robots crawl-delay helps, but the structural fix is the two-stage frontier whose back queues enforce one-request-per-host-per-delay even where robots gives no delay. A single priority queue can't do that.
Quiz
Completed
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?
Heads-up Replication is about durability, not ordering. Order is per-partition; you keep a user's events ordered by routing them to one partition via a partition key, not by adding replicas.
Heads-up That gives total order but caps throughput and consumer parallelism to one — defeating partitioning. The right move is a per-user partition key so each user is ordered while the topic still scales across partitions.
Heads-up Exactly-once is about duplicates/loss, not ordering. Ordering for a user comes from a stable partition key routing their events to one ordered partition.
Quiz
Completed
A consumer commits its offset AFTER processing each message. The process crashes after a side effect but before the commit. On restart, what happens?
Heads-up Skipping happens when you commit BEFORE processing. Committing AFTER means an uncommitted message is re-read on restart — at-least-once, with possible duplicates, not loss.
Heads-up Committing after processing gives at-least-once (duplicates on retry), not exactly-once. Exactly-once needs an idempotent consumer or an atomic offset-plus-side-effect transaction.
Heads-up A crash triggers a rebalance, but the partition resumes from the last committed offset — re-reading the uncommitted message. That's at-least-once: reprocessing, not skipping.
Quiz
Completed
A crawler's exact seen-URL set would need ~1 TB of RAM. You swap in a bloom filter. Which statement is correct?
Heads-up Bloom filters never give false negatives: 'not seen' means definitely new. The error is a false positive (a new URL flagged seen and skipped) — the opposite direction.
Heads-up It's probabilistic, not lossless. It trades a tunable false-positive rate for huge memory savings — the reason it fits where the exact 1 TB set doesn't.
Heads-up URL dedup (the bloom filter) and content dedup (hashing the body) catch different duplicates — the same content reached via http/https or tracking params has different URLs. You still need both.
Recall before you leave
01
What quorum gives read-your-write at N=3, and why?
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.