← Lessons

quiz vs the machine

Gold1360

System Design

Fan Out On Read

Assembling a feed fresh at request time by pulling from followed accounts.

4 min read · core · beat Gold to climb

Pull at read time

In fan out on read, also called pull, the system does almost nothing when a post is created. It simply stores the post under its author. The work happens when a user opens their feed.

At that moment the system gathers the list of accounts the user follows, fetches recent posts from each, merges them by time or score, and returns the result.

Why it can be the right choice

  • Writes are cheap. A post is one insert under the author, no fan out.
  • No wasted work for inactive followers.
  • No giant precomputed feeds to store.

The cost

  • Reads are expensive. Each feed open queries many authors and merges results.
  • A user who follows thousands of accounts makes a heavy, slow read.
  • Without caching, popular hours hammer the same author posts repeatedly.

This model shines when users follow few accounts or post rarely, the opposite profile from push.

Key idea

Fan out on read stores posts cheaply and builds the feed by querying followed accounts at request time, trading expensive reads for cheap writes.

Check yourself

Answer to earn rating on the learn ladder.

1. Where does fan out on read do its main work?

2. Which scenario favors fan out on read?