← Reddit Interview InsightsSoftware Engineer

Reddit·Software Engineer·Onsite - System Design / Architecture·Senior

SeniorPrefer not to say
May 2026Remote

Summary

Reddit system design round for a software engineer role. The whole thing was one long question about building a leaderboard service, starting dead simple and then getting pushed through scaling scenarios until things got messy.

Questions Asked (1)

Q1

Design a leaderboard service that tracks the top-K scores across users. Start with a minimal single-server version handling low traffic, then scale it incrementally through sorted data structures, partitioning strategies, replication, consistency trade-offs, and a friends-only leaderboard variant.

System DesignTechnical Trade-offsAlgorithms & Data Structures
Author's notes

This one ran the full hour.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start with a minimal single-server design using an in-memory sorted data structure (e.g., balanced BST or skip list) to maintain top-K scores, then iteratively scale by partitioning users across shards, adding replication for fault tolerance, and making consistency trade-offs (e.g., eventual vs strong) based on requirements. Finally, extend to friends-only leaderboards by filtering scores based on social graph relationships, discussing efficient query strategies.

Pro tip: Explicitly state your assumptions about read/write patterns, consistency requirements, and scale (e.g., millions of users, thousands of QPS) before diving into design, and revisit them as you scale—this shows you can drive the conversation and prioritize trade-offs like a senior engineer.

1. Clarify requirements and constraints

Ask about scale (users, QPS), read/write ratio, latency targets, consistency needs, and whether the leaderboard is global or per-community. Define top-K (e.g., K=100) and update frequency.

2. Design minimal single-server solution

Propose an in-memory sorted structure (e.g., balanced BST, skip list, or Redis sorted set) to maintain scores and retrieve top-K in O(log n) or O(K). Discuss persistence and simple API (submit score, get top-K).

3. Scale with partitioning and replication

Shard users by user ID or score range to distribute load, but note that top-K across shards requires merging. Add replication for read scalability and fault tolerance, and discuss consistency models (e.g., eventual consistency for scores, strong for critical updates).

4. Address consistency and trade-offs

Explain how to handle concurrent updates, stale reads, and merge top-K from shards. Consider using a two-tier approach: local top-K per shard, then a global aggregator. Discuss CAP theorem implications and choose appropriate consistency.

5. Extend to friends-only leaderboard

Describe how to filter scores by friends using a social graph. Options: precompute friend lists and query each friend's score (fan-out), or maintain per-user friend leaderboards with incremental updates. Discuss trade-offs in latency and storage.

Key Points to Mention

  • Use of sorted data structures (e.g., balanced BST, skip list, Redis sorted sets) for efficient top-K retrieval.
  • Partitioning strategies: sharding by user ID or score range, and the need for a merge step to compute global top-K.
  • Replication for read scalability and fault tolerance, with trade-offs between consistency and availability.
  • Consistency models: eventual consistency for score updates vs strong consistency for critical operations, and how to handle conflicts.
  • Friends-only leaderboard: filtering by social graph, with approaches like fan-out on read vs precomputed friend leaderboards.
  • Caching and precomputation: caching top-K results, using a separate service for leaderboards, and handling hot keys.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.