open atlas
↑ Back to track
System Design Case Studies SDC · 02 · 06

Social-feed cases: free-recall review

Free-recall prompts across the social-feed cases. Reconstruct each design from memory — notification pipeline, feed fan-out hybrid, chat push/ordering, autocomplete precompute — before revealing the model answer.

SDC Senior ◷ 14 min
Level
FoundationsJuniorMiddleSenior

Retrieval beats re-reading. For each prompt, reconstruct the full design from memory — the pipeline, the tradeoff, the failure mode — before opening the model answer. The effort of rebuilding the architecture is what makes these four cases stick.

Rebuild each design without looking back: the notification fan-out pipeline and what prevents the retry storm; the feed’s fan-out tradeoff and the celebrity hybrid; chat’s push transport, ordering, and delivery ticks; and why autocomplete precomputes everything offline.

Recall before you leave
  1. 01
    Reconstruct the notification pipeline and the three pieces that prevent the retry storm.
  2. 02
    State the feed's fan-out tradeoff, the read:write ratio that decides it, and the celebrity hybrid.
  3. 03
    Explain chat's transport, the persist-before-ack rule, ordering, and the three ticks.
  4. 04
    Why must autocomplete precompute, and how does the trie with top-k per node serve in O(1)?
Recap

If you can rebuild each design from memory, you hold the unit’s spine. The notification system is an async fan-out pipeline whose retry storm is prevented by backoff+jitter, a bounded-retry DLQ, and an idempotency key. The news feed defaults to push (read-heavy, ~100:1) but pulls celebrities in a hybrid because the power-law tail breaks a single strategy. The chat system is server-push over WebSockets routed via a connection registry, persists before it acks, and orders messages with a per-conversation sequence number. Autocomplete precomputes top-k per trie node offline and serves an O(1) read behind an edge cache, never ranking live per keystroke. The through-line: at this depth, every read-heavy social system moves the expensive work to the write or build side so the user-facing path is a cheap, safe lookup.

Connected lessons

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.