Live competitive game leaderboard
Your task
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.
It covers
- Live leaderboard
- Ranking
- Approximate rank