Mock Interviewer

Ask Coach

Ask Coach
Clarify requirements before you design — kept separate from your stage notes.

Tap a question to start, or type your own below.

Twitter System Design

Visual Problem Diagram

Twitter System Design architecture diagram

Scenario

A celebrity posts and 50M followers would each need a mailbox write if you fan out naïvely—your queue depth explodes while timelines for normal users still need < 300 ms loads. The interview is fan-out on write vs pull on read, timeline ranking, and tweet id pagination—not drawing the bird logo.

Design a microblogging platform where users post tweets, follow others, and read a personalized home timeline. The hard part is asymmetric fan-out: most users are cheap to push-update, but celebrities break naive O(followers) writes per tweet.

You should support tweet creation, follow graph, timeline generation, search/trending hooks, and media attachments. Be ready to explain hybrid fan-out, tweet ID design, timeline pagination, and read-heavy scaling. Deletion and consistency of timelines are fair follow-ups.

Constraints

Functional

Post/delete tweet, follow/unfollow, home timeline, user profile timeline, media attachments, search/trending hooks

Non-functional

< 300 ms p95 timeline load, high availability, timeline eventual consistency in seconds, durable tweets

Scale

300M MAU, 500M tweets/day, timeline reads orders of magnitude higher than writes; accounts to 100M+ followers

Stages ahead

1Requirement Analysis
2API Design
3High-Level Design
4HLD Extensions
5Trade-offs

Log in to start practicing

Preview the problem below. Sign in to start your timed session, save progress, and use the AI coach.

Want full access now? View Pro pricing