System Design · core

Feed Systems

Fan-out write/read, timeline.

system-designsystem-design-cases

Mental model

Feed systems pick between two strategies: precompute each follower's feed when you post (fan-out on write), or assemble it at request time (fan-out on read). The real-world answer is usually hybrid — fan-out-on-write fails for celebrities, fan-out-on-read fails for the long tail.

How to study Feed Systems

Begin by restating the mental model in your own words, then connect it to a concrete system you have built or operated. Name the mechanism, the constraint it addresses, and the trade-off it introduces. Use System Design Primer, Feeding Frenzy: Selectively Materializing Users' Event Feeds (SIGMOD 2010), Meta Engineering — News Feed ranking to check details, but close the source before writing your explanation. Retrieval is the learning step; rereading is only preparation.

Next, compare Feed Systems with the neighboring concepts in its roadmap. Ask what changes in correctness, latency, resource use, operability, and failure recovery. Complete News feed (Twitter-style) and preserve the command, input, output, and one failed attempt as evidence. Finish by explaining the idea without jargon to someone who has not studied the track.

Proof of understanding

  • Explain the mechanism from first principles and identify the state it reads or changes.
  • Give one situation where the concept is the right choice and one where it is not.
  • Predict a realistic failure mode before running the drill, then compare the prediction with evidence.
  • Connect the result to a roadmap or build artifact instead of treating the concept as isolated trivia.

Learn from primary sources

Practice and explain it back

News feed (Twitter-style)

Design a home timeline feed: who you follow → posts you see, ranked recency-first. Compare fan-out-on-write vs fan-out-on-read. Address celebrity-follower asymmetry.

Expected evidence: Hybrid fan-out strategy + storage layout + a back-of-envelope read/write QPS estimate.

Open the interactive drill →

Review prompts

  • Describe the hybrid feed strategy and say exactly where the merge happens.

Build evidence

Use a roadmap capstone to turn this concept into working evidence.

Prerequisites

Related concepts

None assigned yet.

Learning paths