How the interviewer opens it
“Design a community discussion platform like Reddit. Users can create communities, publish posts, vote, and reply to comments. Keep community lists responsive under heavy read and write traffic.”
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
- Users and content
- Scale
- Traffic and request mix
- Uneven demand and thread size
- Vote rules
- Post and comment order
- Latency and freshness
- Consistency and availability
- Durability and record sizes
- Scope limits
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 public communities and publish text or link posts.
- Add comments and replies to posts.
- Set or remove one vote per user on each post or comment.
- Read ordered community post lists and comment threads.
Usually out of scope
- Personalized home feeds
- Full-text search
- Private communities
- Media storage
- Full moderation tools
What interviewers ask about
- A user's vote and the displayed total
- A vote replaces an earlier choice. Concurrent devices, retries, and delayed totals must not change the meaning of a successful vote read.
- Community post order under load
- Votes change post order while readers request pages. Popular communities concentrate reads and score updates on a small set of data.
- Large comment threads
- A thread can contain a million comments and deep reply chains. Each comment's changing score affects only its parent's direct-reply order.
Common mistakes
- The design treats each vote request as an increment and loses the user's current choice.
- The design serves current vote reads from a stale cache or asynchronous replica.
- The read path scans and sorts all posts in a community.
- The API returns an entire comment tree.
- The design updates post ranks but never updates score-ordered replies.
- The design serves old ranks without degraded status or freshness failure counts.
The bar by level
- Senior (L5/E5)
- Defines an authoritative vote read path. Connects durable vote changes to counts, post ranks, and each parent's reply order. Handles retries, duplicate events, page shifts, and shared caches.
- Staff (L6+/E6+)
- Derives capacity limits for popular targets and parent indexes. Sets an end-to-end freshness budget, including outages that consume the error budget. Defines quorum failures, replay boundaries, and safe repair without stale vote reads.