JJobsMoi
Reddit

Design a Gaming Leaderboard Service

System Design

Problem

Imagine you are building a backend service for game studios. Games run on players' computers, and after a game session ends the client wants to show two things right away:

  1. the player's personal best for that game
  2. the game's top 100 leaderboard

We only need to persist a submitted score if it sets a new personal best for that player or breaks into the game's top 100. That small requirement changes the whole traffic pattern: a newly launched game can generate a burst of writes, but mature games become much quieter because the leaderboard cutoff rises and most players no longer qualify.

This walkthrough follows the Interview Framework and focuses on what you would actually present in a 45-60 minute interview.

Prioritize availability over consistency. If a cache replica is slightly stale or one region is degraded, it is better to show a slightly old leaderboard and let clients retry score submission than to take the entire feature offline.

The key interview insight is that this is not a "store every score forever" system. Because only personal-best improvements and top-100 candidates matter, both the client and the server can filter most writes before they hit durable storage.

If the interviewer says top 10 instead of top 100, treat K as configurable. The architecture is the same; only the cutoff cache and leaderboard size change.

Assume anti-cheat and score verification are handled upstream by trusted game servers or a separate validation service. The focus here is leaderboard storage, latency, and scaling.

Self-assessment rubric

0/19

Requirements & Scope

Core Architecture

APIs & Data Model

Deep Dives / Trade-offs

Communication

Solution

Loading canvas…

Sign in to get AI feedback on your answer. Your work is saved while you do.

Sign in to evaluate