← Reddit Interview Insights

Reddit·Machine Learning Engineer·Onsite - System Design / Architecture·Senior

Senior
Apr 2026

Summary

Reddit ML Engineer system design round focused entirely on building a comment ranking system from scratch. Pretty deep dive, covering everything from the scoring function to cache invalidation to an ML layer on top. Felt like three interviews crammed into one.

Questions Asked (1)

Q1

Design a ranking system for comments on a post, similar to Reddit or Hacker News. Walk through the full system including functional requirements, ranking logic, architecture, scale, and any ML components.

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

This question is basically five questions wearing a trench coat.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying functional and non-functional requirements, then propose a high-level architecture that separates ranking computation from serving. Dive into the ranking logic (e.g., Wilson score, time decay) and explain how ML models can be integrated for personalization. Finally, discuss scalability, trade-offs, and evaluation metrics.

Pro tip: Emphasize the balance between freshness and quality, and how you would handle cold-start and feedback loops. Mention that ranking is not just a batch job but requires real-time updates and A/B testing infrastructure.

1. Clarify Requirements

Ask about scale (DAU, posts, comments), latency requirements, and whether ranking should be personalized. Define functional requirements: sort comments by relevance, allow upvotes/downvotes, and handle time decay.

2. High-Level Architecture

Outline components: ingestion (votes, comments), storage (SQL/NoSQL for comments, votes), ranking service (batch and real-time), cache (Redis), and API. Discuss data flow from user action to updated ranking.

3. Ranking Logic

Explain base ranking algorithm (e.g., Wilson score, Hacker News formula) with time decay. Discuss how to incorporate user-specific signals (personalization) and ML models (e.g., gradient boosted trees) for predicting comment quality.

4. Scalability and Trade-offs

Address scaling: sharding by post ID, caching hot posts, precomputing scores for inactive posts. Discuss trade-offs between batch vs. real-time, consistency vs. latency, and complexity vs. maintainability.

5. ML Components and Evaluation

Describe ML pipeline: feature engineering (user, comment, context), model training (offline), and serving (online). Discuss evaluation metrics (NDCG, CTR), A/B testing, and handling feedback loops.

Key Points to Mention

  • Use of Wilson score or similar to handle small sample sizes and avoid early bias.
  • Time decay factor to promote fresh comments while maintaining quality.
  • Personalization via ML models that predict user engagement (upvote probability).
  • Caching and precomputation strategies for scalability (e.g., Redis sorted sets).
  • A/B testing framework and metrics like NDCG, CTR, and dwell time.
  • Handling cold-start for new comments and users, and mitigating feedback loops.

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