What it is
A fan out service takes a single event, such as a new post, and delivers it to the feeds of many followers. The core design choice is when to do the work: at write time or at read time.
Fan out on write
When a post is created, the service immediately writes a copy into each follower feed.
- Reads are fast because the feed is already built.
- Writes are expensive when an account has millions of followers.
Fan out on read
The feed is assembled on demand by pulling recent posts from accounts the reader follows.
- Writes are cheap because nothing is precomputed.
- Reads are slower and heavier under load.
The hybrid
Most large systems combine both. Ordinary accounts use fan out on write, while celebrity accounts with huge follower counts use fan out on read to avoid a write explosion. The reader merges precomputed entries with a few pulled at query time.
Key idea
A fan out service decides whether to copy an event into follower feeds at write time or assemble feeds at read time, and large systems blend both to handle celebrity accounts.