Social-feed cases: design and defend a feed-backed app
Hands-on project: produce a design doc for a social app with a news feed, notifications, and presence — choosing fan-out strategies, the celebrity hybrid, delivery guarantees, and ordering — then justify each threshold with a number and validate the riskiest with a prototype.
Knowing each case in isolation is not the same as composing them into one coherent system a staff engineer would sign off on. Take a real-shaped social app, write the design doc end to end — feed, notifications, presence, with every fan-out and consistency choice justified by a number — and then prove your two riskiest decisions with a prototype, not a hand-wave.
This project makes the unit operational: you integrate the four cases into one system, decide each tradeoff against an estimate, and measure to confirm the two predictions most likely to bite — the celebrity fan-out cost and the at-least-once-plus-dedup delivery guarantee.
- 01What load estimates drive the feed and notification design, and how does each become a decision?
- 02How do you validate the two riskiest decisions in a prototype?
- 03Why design and estimate first, then prototype, rather than building immediately?
This project composes the four cases into one system and forces every decision to rest on a number. You write a design doc for a feed-backed social app: estimate feed-read, post-write, and notification QPS (avg and peak, one significant figure), derive the read:write ratio, and use it to choose fan-out-on-write as the feed default with a celebrity threshold that the arithmetic sets, plus a capped feed cache and cursor pagination. You specify the notification pipeline (async fan-out, per-channel queues, idempotency key, retry+jitter into a DLQ, a transactional priority lane) with an explicit at-least-once-plus-dedup guarantee, and you state which surfaces are eventually consistent and why. Then you close the loop: a prototype that shows the celebrity write storm vanish under the hybrid, and a fault-injection run where the idempotency key collapses duplicates while the DLQ captures failures. Estimate first, validate second — the napkin tells you the shape and the riskiest predictions; the prototype confirms them. An engineer who has built this once composes social systems deliberately instead of discovering the celebrity tail in production.
Something unclear?
Ask a question about this lesson. Questions are anonymous and go straight to the author to make the lesson better.