Loading…
Design Twitter's News Feed is a hard system design interview question covering fan-out, caching, message queues, databases — the kind asked at FAANG (Facebook/Meta, Apple, Amazon, Netflix, Google) and AI-first companies like Anthropic, OpenAI, and Nvidia.
Design the news feed feature for Twitter. When a user opens the app, they should see a feed of tweets from accounts they follow, ranked by recency. Assume 500M daily active users, each with an average of 300 follows.
That's it. No further details. This is intentional — your first job is to scope the problem by asking the right clarifying questions.
Tests your understanding of fan-out patterns, the celebrity problem, read vs. write optimisation, and whether you can reason about scale constraints that force architectural decisions. A strong candidate identifies the celebrity problem unprompted and proposes a hybrid fan-out strategy.
Work through the Clarify phase by asking questions one at a time — just like a real interview.
Each answer reveals why that question matters and how it changes your design decisions.
Once you've clarified enough, unlock the full architecture, calculations, and trade-off analysis.
Use fan-out on write for most users: when a tweet is created, push its ID into each follower's timeline cache (Redis sorted set by timestamp). For celebrity accounts (>1M followers), use fan-out on read to avoid write amplification. Merge at read time for users following celebrities.
Design rounds are decided on capacity estimates. Both tools are free.
Longer written walkthroughs of the ideas behind it.
What each one means, and how interviewers probe it.
A full interview loop is more than one round. These are the others, each with what is on the site for it.