System Design

News Feed: Fanout-on-Write vs Fanout-on-Read

System Design diagram · made in Skemio

System architecture diagram contrasting Fanout-on-Write through Redis caches with Fanout-on-Read dynamic aggregation for celebrity accounts.
System architecture diagram contrasting Fanout-on-Write through Redis caches with Fanout-on-Read dynamic aggregation for celebrity accounts.

What it shows

  • Fanout-on-write pushes posts directly to follower timeline caches on write.
  • Celebrity posts cause write amplification spikes across millions of feeds.
  • A hybrid model pushes for normal users and pulls for celebrities on read.

The takeaway

Push for regular users to keep reads instant; pull for celebrities to protect your write pipeline.

More system design diagrams