Code Room
System designMediumsd-g084
Subject TrendingLevel Mid–Senior~40 minCommon in Databases & SQL interviewsIndustries Technology, Software development

Question

Design a 'top stories' / hot-ranking system for a community link-aggregator (like a tech-news front page). Stories are ranked by a score combining votes, comments, and age (newer rises, then decays). Scale: 5M users, 50k new stories/day, the front page is read millions of times/hour, and a story's rank must update within ~1 minute of new votes.

What a strong answer looks like

Clarify scale and constraints first. Propose a clean component breakdown, then go deep on the hard parts — data model, bottlenecks, consistency, failure modes — and name the trade-offs you are making.

Narrate your design
Loading whiteboard…
Run or narrate your approach, then ask the coach.