← Meta Interview Insights

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

SeniorPrefer not to say
Jun 2026

Summary

Meta system design round for a software engineer role, single question but it sprawled into basically every distributed systems topic you can think of. Left feeling like I'd covered a lot of ground but not sure I went deep enough on any one piece.

Questions Asked (1)

Q1

Design a system that computes each user's top 10 most-listened-to songs, covering everything from event ingestion through to the API that serves the results.

System DesignTechnical Trade-offsData Modeling
Author's notes

This thing kept expanding.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements and scale (e.g., daily active users, events per second, latency needs), then design a pipeline that ingests events into a durable log, processes them in a streaming or batch fashion to maintain per-user top-K counts, and serves results via a low-latency API. Emphasize trade-offs between accuracy, cost, and freshness, and how you'd handle hot users and data skew.

Pro tip: Propose a hybrid approach: use a streaming layer for near-real-time approximate counts and a batch layer for exact daily recomputation, then merge results at query time—this shows you understand real-world constraints and can balance freshness with correctness.

1. Clarify Requirements and Scale

Ask about expected QPS, event volume, latency SLA, accuracy requirements (exact vs approximate), and whether counts are global or time-windowed. This scopes the design and shows you prioritize user needs.

2. Design Event Ingestion

Propose a scalable ingestion layer (e.g., Kafka or a similar distributed log) that can handle high write throughput and durably buffer events. Discuss partitioning by user ID to ensure ordered processing per user.

3. Process and Aggregate

Outline a stream processing job (e.g., Flink, Spark Streaming) that consumes events, maintains per-user song counts, and computes top-10 using a space-efficient algorithm like Count-Min Sketch with a heap. Mention handling late/out-of-order events and data skew.

4. Store and Serve Results

Store the top-10 lists in a low-latency store (e.g., Redis or a wide-column database) keyed by user ID. Design an API that fetches the list with caching and fallback to batch-computed results if needed.

5. Address Trade-offs and Failure Modes

Discuss trade-offs: approximate vs exact counts, streaming vs batch, cost vs latency. Cover failure scenarios (e.g., stream job restart, data loss) and how to ensure correctness (e.g., idempotent processing, checkpointing).

Key Points to Mention

  • Partitioning by user ID to ensure per-user ordering and scalability
  • Using approximate algorithms (e.g., Count-Min Sketch) for memory efficiency and handling hot users
  • Lambda architecture or hybrid approach for balancing freshness and accuracy
  • Idempotent processing and exactly-once semantics to avoid double counting
  • Caching and read replicas for low-latency API serving
  • Monitoring and alerting for data quality and pipeline health

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