ScaleCrafts

Design Reddit

Communities where users post links and text, vote on them and discuss in threaded comments, like Reddit.

Functional requirements

  • Post to a community
  • Upvote and downvote posts and comments
  • See hot, new and top lists per community and on the home page

Non-functional requirements

  • Front pages load in under 300 ms
  • Votes are reflected within seconds
  • Viral posts don’t overload the database

Scale

  • 100M daily users
  • 1B votes per day
  • Votes outnumber posts 1,000 to 1

How you’ll be scored

10 checks covering your diagram and your notes, and any valid approach counts. Hints appear for anything you miss. Common mistakes, such as single points of failure or components you never explain, cost points. How grading works

What interviewers look for

  • Clarify before you draw. State what is in and out of scope. For “Design Reddit”, that starts with: Post to a community; Upvote and downvote posts and comments; See hot, new and top lists per community and on the home page. Interviewers notice candidates who pin the requirements down first.
  • Turn the scale into numbers. The scale (100M daily users; 1B votes per day; Votes outnumber posts 1,000 to 1) should become requests per second, storage and bandwidth, and those figures should drive your choices. Estimates with units carry more weight than adjectives.
  • Show how each quality is met. Your design should visibly deliver: Front pages load in under 300 ms; Votes are reflected within seconds; Viral posts don’t overload the database. Saying that it does isn’t enough; point to the part of the design that makes it true.
  • Expect follow-ups on the hard parts. Interviewers usually probe ranking, voting and caching here. This is a medium problem, so interviewers expect you to weigh two reasonable options, such as consistency against latency, and to say why you picked one.
  • Explain failure and trade-offs. Say what happens when a component fails, where a single point of failure would hurt, and what you chose not to build. Naming a trade-off is a stronger answer than claiming there isn’t one.

Related problems

Loading your workspace…