Code Room
System designHard
Question
Design a live, real-time leaderboard for a competitive game with 50M players where scores change constantly (thousands of score updates/sec) and players want to see, in real time: the global top-100, their own exact rank, and the few players just above/below them. Showing your rank among 50M means computing position in a giant sorted set on every update, which is too expensive to do exactly. Hot events spike updates 10x.
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.