← Reddit Interview Insights

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

SeniorPrefer not to say
May 2026

Summary

Reddit system design round, one big question about trending/hot posts. Pretty open-ended and they clearly wanted you to go deep on multiple dimensions at once, which I was not fully prepared for.

Questions Asked (1)

Q1

Design a system that surfaces the hottest posts over a configurable time window (e.g. last hour or last day), covering event ingestion, ranking signal aggregation, time-decay, top-K maintenance, storage layout, and real-time vs batch tradeoffs.

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

I started with ingestion and got a bit stuck on the time-decay part longer than I should have.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements and constraints, then propose a high-level architecture that separates ingestion, aggregation, ranking, and serving. Walk through the data flow, emphasizing how to handle time-decay and top-K efficiently, and discuss trade-offs between real-time and batch processing.

Pro tip: Mention that ranking signals should be aggregated in a way that supports incremental updates and that the time window is configurable, so the system must handle both sliding and tumbling windows. Also, highlight the importance of idempotency and exactly-once processing in event ingestion to avoid skewed rankings.

1. Clarify Requirements and Scale

Ask about expected QPS, number of posts, time window granularity, and latency requirements. Define what 'hottest' means (e.g., upvotes, comments, shares) and how configurable the window is.

2. Design Event Ingestion Pipeline

Propose a scalable ingestion layer (e.g., Kafka) to collect user interactions. Ensure events are partitioned by post ID for ordered processing and discuss exactly-once semantics.

3. Aggregate Ranking Signals with Time-Decay

Use a stream processor (e.g., Flink) to compute a score per post using a decay function (e.g., exponential or linear). Maintain a sliding window of events and update scores incrementally.

4. Maintain Top-K Efficiently

Employ a distributed top-K algorithm (e.g., using a heap or count-min sketch with heap) to track the highest-scoring posts. Periodically merge results from partitions and handle late data.

5. Storage and Serving Layer

Store the top-K results in a low-latency store (e.g., Redis) for fast retrieval. Discuss batch recomputation for correction and the trade-offs between real-time and batch processing.

Key Points to Mention

  • Time-decay functions (e.g., exponential decay) and how to tune parameters for different windows.
  • Sliding vs. tumbling windows and their impact on ranking freshness and computational cost.
  • Distributed top-K algorithms (e.g., using heaps, count-min sketch) and merging strategies.
  • Exactly-once processing and idempotency in event ingestion to avoid double-counting.
  • Trade-offs between real-time streaming (low latency, higher cost) and batch processing (higher latency, simpler).
  • Storage layout: using in-memory stores for serving and persistent storage for batch recomputation.

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