Menu

1 / 3

Twitter's Fanout Strategy at Scale: The Trade-Off Most Designs Miss

DEV Community·Gabriel Anhaia·6 months ago
#pHg2lauJ
Reading 0:00
15s threshold

Book: System Design Pocket Guide: Interviews

Also by me: Database Playbook

My project: Hermes IDE | GitHub — an IDE for developers who ship with Claude Code and other AI coding tools

Me: xgabriel.com | GitHub

Imagine a top-followed account posts a tweet. Call it 100M followers, roughly the order of the largest accounts on X today. If you fanned that tweet out to every follower's home timeline at write time, you'd execute 100M list-prepends in the few seconds the post takes to render, and your write tier would saturate.

So nobody does that. Twitter's home timeline at hundreds of millions of users is built on a hybrid: fanout-on-write for normal users, fanout-on-read for celebrities, with a merge step at the edge that hides the seam. Most candidates draw the push-only diagram, the interviewer says "celebrity," and the whiteboard collapses. The hybrid is the answer.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.