Code Room
System designMediumsd-g578
Subject System designLevel Mid–Senior~35 minCommon in ML systems · Distributed systems · Algorithms & data structures interviewsIndustries Computer games, Technology

Question

Design a real-time leaderboard for an online game with ~5M active players. Requirements: show the global top 100, a player's own rank, and a window of ranks around the player ('you are #42,318, here are the 5 above and below'), all updating within ~1s of a score change. Scores change frequently during play (~50K score updates/sec at peak). Also support per-region and weekly-reset leaderboards. p99 for 'get my rank' and 'get top 100' under 50ms.

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.