Code Room
System designMedium
Question
Design a real-time global leaderboard for a competitive game with 80M monthly players: scores update constantly during matches, players want their exact rank and the top-100 to refresh within ~1s, and you also need 'players near my rank' and weekly/seasonal resets. Walk through the data structures and how you keep rank queries fast at this scale.
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.
Learn the concepts
Loading whiteboard…
Run or narrate your approach, then ask the coach.