Twitter News Feed — Mock Interview
HardA read-heavy social feed: fan one tweet out to millions of home timelines without collapsing on celebrity accounts.
Interviewer
Twitter News Feed — Mock Interview
You're designing Twitter's news feed for a live system-design interview. Users post tweets, follow each other, and open a home timeline — a merged, recent feed of tweets from everyone they follow. The defining challenge is fan-out: getting each tweet into all its followers' timelines, cheaply, while reads outnumber writes by more than an order of magnitude.
Scale assumptions:
- 500M registered users; ~200M DAU, each posting ~2.5 tweets/day and opening their timeline ~50×/day.
- Average ~200 followers per user; a celebrity can have ~100M followers.
- Roughly 5,000 tweets/s written, ~100k timeline reads/s average (~500k peak) — reads dominate ~20:1.
- Targets: home timeline < 200 ms p99, 99.99% read availability; feeds may be a few seconds stale (eventual consistency).
I'll take you through requirements, estimation, architecture, the fan-out/celebrity deep dive, and trade-offs. Think out loud and state your assumptions.
Sign in to start the interview.
The interviewer grades each stage against a hidden rubric and asks a probing follow-up, mirroring a real system design round. Sessions are capped at 30 turns.