← Reddit Interview Insights

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

SeniorPrefer not to say
Apr 2026

Summary

Reddit system design round for a software engineer role, focused entirely on building a leaderboard service from scratch and scaling it up. The progression from a toy single-server version to a distributed, eventually-consistent system with a friends-filter variant made this one of the more thorough design interviews I've sat through.

Questions Asked (3)

Q1

Design a leaderboard service that tracks the top-K scores across all users, starting from a minimal single-server setup with low traffic and no social filtering.

System DesignAlgorithms & Data StructuresTechnical Trade-offs
Author's notes

I started with a sorted set in Redis and explained why a skiplist makes inserts and rank queries both fast.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements and constraints, then design a minimal single-server solution using an in-memory data structure like a sorted set or heap to track top-K scores. Discuss trade-offs of this approach and outline how it would evolve to handle scale, but keep the initial design simple and focused.

Pro tip: Emphasize that you're starting simple to validate the core functionality and avoid over-engineering; mention that you'd instrument the system to measure performance and guide future scaling decisions.

1. Clarify Requirements

Ask questions to understand expected traffic, score update frequency, read patterns, and whether scores are per-user or per-item. Confirm that social filtering is out of scope.

2. Design Minimal Single-Server Solution

Propose an in-memory data structure (e.g., a balanced BST, skip list, or heap) to maintain top-K scores. Describe the API for submitting scores and retrieving the leaderboard.

3. Analyze Trade-offs

Discuss time and space complexity of operations, and trade-offs between different data structures. Consider persistence and recovery on restart.

4. Plan for Evolution

Outline how the design would scale with increased traffic, such as adding caching, sharding, or using a distributed store like Redis sorted sets.

Key Points to Mention

  • Choice of data structure (e.g., sorted set, heap) and its impact on performance
  • Time complexity for score updates and top-K retrieval
  • Handling ties and score updates efficiently
  • Persistence and recovery strategies for single-server setup
  • Monitoring and metrics to inform scaling decisions
  • Potential bottlenecks and how to address them as traffic grows

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

Q2

How would you scale this leaderboard to handle much higher read and write throughput? Walk through your partitioning and replication strategy.

System DesignTechnical Trade-offsData Modeling
Author's notes

This is where I spent the most time.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the current scale and requirements, then propose a partitioned and replicated architecture that separates read and write paths. Discuss trade-offs between consistency, latency, and complexity, and justify choices based on Reddit's specific needs.

Pro tip: Mention that leaderboards often have skewed access patterns (e.g., top 100 users get most reads), so consider caching hot entries and using read replicas to offload the primary. Also, discuss how to handle rank updates efficiently, perhaps with a write-optimized store and periodic batch updates to the read-optimized store.

1. Clarify Requirements and Constraints

Ask about expected read/write QPS, latency requirements, consistency needs (e.g., eventual vs strong), and data size. This shows you understand the problem before jumping to solutions.

2. Design Partitioning Strategy

Propose partitioning by user ID or leaderboard ID to distribute load. Discuss hash-based partitioning for even distribution and range-based for efficient range queries, considering the trade-offs.

3. Design Replication Strategy

Suggest using leader-follower replication for read scalability and fault tolerance. Mention multi-leader or leaderless replication if cross-region writes are needed, and discuss consistency implications.

4. Optimize Read and Write Paths

For reads, use caching (e.g., Redis) for hot leaderboards and read replicas. For writes, consider batching, write-behind caching, or using a write-optimized store like Cassandra, then asynchronously updating the read store.

5. Address Trade-offs and Failure Handling

Discuss trade-offs between consistency and availability (CAP theorem), and how to handle rebalancing, hot partitions, and failover. Mention monitoring and auto-scaling.

Key Points to Mention

  • Sharding by user ID or leaderboard ID to distribute load
  • Read replicas and caching for read-heavy workloads
  • Write optimization: batching, async updates, or using a write-optimized database
  • Consistency models: eventual consistency for leaderboards is often acceptable
  • Handling hot partitions and skewed access patterns
  • Fault tolerance and replication for high availability

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

Q3

Now extend the design to support a 'friends leaderboard' where a user can see the top-K scores only among their friends. What changes?

System DesignTechnical Trade-offsData Modeling
Author's notes

Wasn't expecting this variant and it showed.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the existing leaderboard design and assumptions, then identify the new requirements: friend relationships and per-user top-K queries. Propose a data model for friendships and an efficient way to compute top-K among friends, discussing trade-offs between precomputation and on-demand queries.

Pro tip: Mention that friend leaderboards are read-heavy and per-user, so caching or precomputing per-user results (e.g., using a fan-out approach) can drastically reduce latency, but be mindful of the write amplification and storage cost.

1. Clarify requirements and assumptions

Confirm the scale (number of users, friends per user, K), read/write patterns, and whether friend relationships are bidirectional. Also check if scores update frequently and if real-time accuracy is required.

2. Model friend relationships

Design a storage schema for friendships, such as an adjacency list (user_id, friend_id) with appropriate indexing. Consider using a graph database or a distributed store like Cassandra for scalability.

3. Design top-K query among friends

Propose an approach to retrieve top-K scores from a user's friends. Options include: (a) on-demand: fetch friend IDs, then query their scores and merge; (b) precomputed: maintain a per-user leaderboard updated on score changes or friend changes.

4. Evaluate trade-offs and choose approach

Compare on-demand vs. precomputed based on latency, consistency, and cost. For Reddit-scale, a hybrid approach (e.g., precompute for active users, on-demand for others) or using a cache with TTL might be optimal.

5. Address scalability and updates

Discuss how to handle score updates and friend additions/removals. For precomputed, consider fan-out on write; for on-demand, use efficient merging (e.g., heap) and caching. Also mention sharding and replication.

Key Points to Mention

  • Friend graph storage: adjacency list vs. edge list, and indexing for fast friend retrieval.
  • Top-K algorithms: using a min-heap of size K to merge sorted lists or querying a sorted set per friend.
  • Precomputation vs. on-demand: trade-offs in latency, consistency, and storage/compute cost.
  • Caching strategies: per-user leaderboard cache with invalidation on score/friend changes.
  • Scalability: sharding by user_id, replication for read-heavy workloads, and handling hot users.
  • Real-time vs. eventual consistency: acceptable staleness for leaderboards and how to achieve it.

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