Design a Distributed Message Queue

Last updated: June 17, 2026

Quick Overview

Design a distributed message queue system like Kafka. Cover partitioning strategies, consumer groups, exactly-once delivery semantics, replication, and handling backpressure at Meta's scale.

Meta
System Design
Software Engineer
Meta
June 17, 2026
Software Engineer
Onsite
System Design
Hard

238

0

402 solved


Design a distributed message queue system like Kafka. Cover partitioning strategies, consumer groups, exactly-once delivery semantics, replication, and handling backpressure at Meta's scale.

How to Approach This
  1. Start by clarifying functional and non-functional requirements with the interviewer.
  2. Estimate the scale: QPS, storage, bandwidth. This drives your design decisions.
  3. Draw a high-level architecture first, then deep dive into 1-2 critical components.
  4. Discuss trade-offs explicitly (e.g., consistency vs availability, SQL vs NoSQL).
  5. Address failure scenarios, monitoring, and how the system handles 10x traffic spikes.
Sharpen Your Skills on Codemia

Practice similar problems with our interactive workspace, get AI feedback, and track your progress.

Practice System Design Problems
Sample Answer
Requirements

Functional Requirements

  1. Message Production: The system should allow producers to publish messages to specific topics with a defined schema.
  2. Message Consumption: Consumers should be a...
Capacity Estimation

Let's estimate the scale at Meta. Assuming:

  • Number of Daily Active Users: 3 billion
  • Average Messages per User per Day: 50
  • Message Size: 1 KB

Daily Message Volume

Total messages...


Submit Your Answer
Markdown supported

Related Questions