Design Voting at Scale
Voting is the little pair of arrows next to every post and comment on Reddit. Tap up or tap down, and the thing's net score (upvotes minus downvotes) moves, feeding into a user's karma and into where the post lands in a community's ranking. It looks like the simplest feature on the site. It is not. A single popular post in a large subreddit can draw hundreds of votes a second. Every one has to change a count and feed a ranking, and it has to survive people trying to rig it.
So the interesting design question is not "how do you add one to a number." The hard version shows up at scale. Adding one happens tens of thousands of times a second. The same user's vote can arrive twice on a flaky connection. The number decides what millions of people see next. And a whole economy of bots is trying to push that number in a direction real users did not. Scope the hour around those four pressures: the write path, idempotency, the ranking recompute, and integrity. The count itself is the easy part.
- 1 diagram
- 6 sections
- about 40 min
Premium lessonReddit interview guide
These took digging.
What candidates walked out with, from 20,000+ reports, forum threads behind logins and write-ups in Chinese. Then solved step by step.
100 companies. Checked every month.
Unlock all 100 companies$49 a year · less than $1 a week · Cancel anytime
Reddit interview guideKnow what Reddit asks before you walk in.
16 coding · 5 system design · 23 behavioral questions
Get their questions first.
InterviewLegend is independent and not affiliated with or endorsed by any company it covers.