HLDArena
HLD-403·Messaging & Fan-out
Expert · 2,000 pts

10M-Viewer Live Sports Broadcast Chat & Reactions

Design a stadium-scale live video chat and emoji reaction pipeline surviving 300k+ RPS goal-moment spikes on a single championship broadcast.

Max p99
≤ 80 ms
Availability
≥ 99.5%
Budget
≤ $9,200

Functional Requirements

  • FR-1POST /streams/{stream_id}/chat — Ingests viewer chat messages and reaction bursts.
  • FR-2GET /streams/{stream_id}/feed — Serves windowed room messages & aggregated reaction counts to edge gateways.
  • FR-3PATCH & DELETE /streams/{stream_id}/chat — Updates, revokes, or deletes stream_id entries with bounded TTL or explicit cache/index invalidation.
  • FR-4Must survive extreme single-room Zipfian skew and an 8x downstream storage latency brownout.

Workload Profile

Pre-Match Load95,000 Read RPS / 14,000 Chat Write RPS
Overtime Goal Peak260,000 Read RPS / 42,000 Write RPS (302k total)
Active Working Set48 GB live room ring buffers & reaction buckets
Contention ProfileExtreme alpha=1.35 skew on championship stream_id

Consistency Model

Bounded eventual fan-out (< 2s window) acceptable; requires salted/bucketed partitioning and brownout circuit breaking.

Design Write-up
0 boxes · 0 edges
0 words
Hidden Cases #4–#7 run automatically on Submit
Case 1: Smoke & API ContractInput Workload
Read RPS
2,000 rps
Write RPS
400 rps
Key Distribution
Uniform (Low Skew)
Chaos Fault
None (Healthy Cluster)
Expected Pass CriteriaASSERTIONS
• Tail Latency: p99 ≤ 160 ms
• Availability: ≥ 99.5%
Valid end-to-end Client → Compute → Storage topology