Real-time global leaderboard
Design a real-time global leaderboard for a mobile game with 80M monthly players. After every match a player's score updates, and they want to see (1) the global top 100, (2) their own rank, and (3) a small window of players ranked just above and below them — all updating within ~1 second. Scores change millions of times per minute during peak. Computing an exact rank over 80M rows on every read is far too expensive. How do you maintain ranks and serve these three queries cheaply?
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.
Clarify4:30 left
Estimate4:30 planned
Design13:30 planned
Deep dive10:30 planned
Failure7:00 planned
Which questions mattered is sealed until you submit. Telling you now would just be handing over the edge cases.
Run or narrate your approach, then ask the coach.