DesignTheSystem/dev
HARD Real-Time & Messaging Asked at LinkedIn, Confluent, Uber

Design Messaging Queue

Design Messaging Queue: Architect a scalable, highly-available distributed system capable of sustaining 60,000 peak RPS (40% reads). Maintain p99 latency under 50ms with 99.9% availability while optimizing monthly infrastructure cost within $850/mo.

Category & DifficultyReal-Time & Messaging · HARD
Traffic Profile60,000 RPS sustained, 84,000 RPS spike (40% reads / 60% writes)
Latency & Availability SLAp99 < 50 ms · 99.9% availability
Monthly Infra Budget$850/month
Commonly Asked AtLinkedIn, Confluent, Uber

Scale, traffic & SLA targets

To pass in the DesignTheSystem simulator, your architecture must hold all four targets simultaneously across a 60-second load run (spiking up to 84,000 RPS):

Peak traffic60,000 RPS40% reads / 60% writes
Latency (p99)< 50 ms99th percentile target
Availability99.9%Max error rate 0.10%
Monthly budget$850/moPriced per component

Functional & non-functional requirements

Functional scope

  • Serve Design Messaging Queue at the traffic below.

Non-functional goals

  • p99 latency under 50 ms at the spike.
  • At least 99.9% of requests answered.
  • Costs no more than $850 a month.

Core challenge: A log split into partitions

Producers append messages to partitions and consumers read at their own pace. More partitions let more consumers read in parallel; copies on several brokers keep messages safe.

What breaks first?

Run the starting design first and look at what breaks. Primary Database reaches 880% of its capacity at the spike, and App Service Tier 502%. About 81% of requests fail. Open Full metrics to see which requests pile up there, and ask why that part gets so much traffic.

Key architectural trade-offs

  • Messages are delivered a moment after they are accepted, and a receiver may get one twice after a failure, so handlers must cope with repeats.

Starting architecture & how to practise

The simulator starts you with a baseline setup: Traffic Ingress → App Service Tier → Primary Database. Run the baseline under 60,000 RPS to watch exactly which component saturates first, then add caching, queues, replicas, sharding or CDN until latency, availability and cost all turn green.

Common interview questions for Design Messaging Queue

What are the target SLA and scale numbers for Design Messaging Queue?

Design for 60,000 RPS sustained (spiking to 84,000 RPS) with a 40% read / 60% write mix, keeping p99 latency under 50 ms, availability at or above 99.9%, and infrastructure spend within $850/month.

What is the main architectural bottleneck in Design Messaging Queue?

Producers append messages to partitions and consumers read at their own pace. More partitions let more consumers read in parallel; copies on several brokers keep messages safe.

How can I verify my Design Messaging Queue architecture works under load?

Open the live simulator to wire up load balancers, caches, queues, replicas, or shards and run a 60-second traffic simulation that grades latency, error rate, and monthly cost automatically.

Recommended lessons before you build

Related Real-Time & Messaging problems