Real-time leaderboard
Your task
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.
It covers
- Leaderboard
- Ranking
- Sorted sets
- Real time