HLDArena
HLD-320·Messaging & Fan-out
Hard · 1,500 pts

Sub-40ms Live Stock Quote Snapshot & WebSocket Ticker Feed

Design Robinhood / Bloomberg’s live market-data ingestion and fan-out tier delivering NBBO top-of-book quotes and 1-minute OHLCV candles to millions of traders.

Max p99
≤ 38 ms
Availability
≥ 99.5%
Budget
≤ $8,700

Functional Requirements

  • FR-1POST /market/ticks/{symbol} — Ingests exchange feed ticks, updates latest NBBO & 1m candle.
  • FR-2GET /market/quotes/{symbol} — Serves sub-40ms p99 quote snapshot and sparkline to trading clients.
  • FR-3DELETE /market/ticks/{symbol} — Releases canceled or expired leases/holds atomically and immediately refreshes cached availability.
  • FR-4Must absorb 9:30 AM market-open tick floods on meme/mega-cap symbols and survive node crashes.

Workload Profile

Midday Trading62,000 Quote Read RPS / 12,000 Exchange Tick RPS
9:30 AM Market Open Bell155,000 Read RPS / 30,000 Tick Write RPS
Active Working Set24 GB NBBO books & intraday 1-second candle rings
Latency GateStrict p99 <= 38 ms under extreme ticker skew

Consistency Model

Monotonic read-after-write quote timestamps per symbol so clients never observe price time-travel.

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 ≤ 76 ms
• Availability: ≥ 99.5%
Valid end-to-end Client → Compute → Storage topology