A game leaderboard is a ranked list that shows players their standing compared to others. Most competitive online games provide at least two perspectives: a global ranking of the top performers and a friends-only ranking so players can compare scores with their social circle. The displayed list is short, but the underlying system must sustain rankings efficiently at massive scale while avoiding expensive per-request computation for the friend view.
A leaderboard system seems straightforward because it produces only a short sorted list. The real difficulty lies in maintaining rankings cheaply across 50 million players while also serving a friend-scoped view that cannot simply reuse the global ranking query.
Out of scope (below the line)
| Metric | Value | Design consequence |
|---|---|---|
| Registered players | 50M | Size of the ranking index |
| Daily active users (DAU) | 5M | Read volume for leaderboard queries |
| Peak score updates | ~10K/sec | Write throughput for ranking index |
| Global top‑10 reads | ~50K/sec (assuming 10 reads per DAU spread across peak hours) | Caching opportunity for identical result |
| Friend leaderboard reads | ~20K/sec | Per‑user computation, not globally cacheable |
| Avg friends per player | ~200, bounded at 1 000 | Fan‑in set size for friend leaderboard |
The numbers that truly drive the design are the 50M entries in the ranking index (far too large for naive SQL rank queries) and the bounded size of a friend list (small enough that reading and sorting friends on the fly is cheap).