How the interviewer opens it
“Design a microblogging platform like Twitter. People can publish short posts, follow accounts, reply to posts, and repost posts. Some accounts have millions of followers.”
The prompt is vague on purpose. The first minutes are for you. Reduce the prompt to the core features and agree on the numbers before you draw.
What to clarify first
- Audience and peak traffic
- Read and write mix
- Follow counts and celebrity accounts
- Home contents
- Latency
- Consistency and availability
- Durability and retention
- Follow changes and deletion
- Content and home history
- Deployment and exclusions
The interviewer has the answers. In a SysRound round, Alex gives these answers, as a real interviewer does.
Scope of a strong answer
Core requirements
- Create and delete short posts, replies, and reposts.
- Follow and unfollow public accounts.
- Read the latest 1,000 eligible home entries, with the newest first.
- Read account timelines and reply threads.
Usually out of scope
- Media uploads and video delivery.
- Search, trends, and ranked recommendations.
- Private accounts and private messages.
- Ads and notifications.
- Global write availability.
What interviewers ask about
- Traffic from popular accounts
- One publication can reach 50 million followers. The service must prevent this work from delaying other authors or overwhelming home reads.
- Timeline order and page boundaries
- Many sources contribute entries at different times. The service must preserve page order without reading every followed account's full history.
- Follow changes and post removal
- Visibility changes can remove most recent candidates. Older eligible posts must remain available without a large scan or edits to every cached reference.
Common mistakes
- The design treats every author the same despite the difference between typical accounts and celebrities.
- The publication request waits for every follower's home update.
- The read plan ignores the maximum follow count and users who return after a long absence.
- The design caps candidates at 1,000 before visibility checks and provides no source for older eligible entries.
- The pagination plan ignores late delivery and distinct repost identities.
- The design treats cached references as the authority for follows and deletion.
The bar by level
- Mid-level (L4/E4)
- Defines posts, follows, replies, and reposts. Builds a working home flow with cursor pagination. Explains celebrity traffic and provides a source refill path.
- Senior (L5/E5)
- Quantifies fanout and bounded source reads. Handles returning users, visibility changes, retries, and page limits. Meets latency and freshness targets during normal operation.
- Staff (L6+/E6+)
- Defines cache coverage and safe delivery changes. Bounds worst-case refill work and shard requests. Plans replay and recovery while stating failure behavior and capacity limits.