HLDArena
HLD-216·Messaging & Queues
Medium · 1,000 pts

Flight & Retail Price-Drop Watchlist Matcher

Design a price-tracking alert service matching continuous airline and retail fare repricing streams against millions of user target-price watchlists.

Max p99
≤ 58 ms
Availability
≥ 99.5%
Budget
≤ $5,100

Functional Requirements

  • FR-1POST /fares/{route_id} — Ingests live supplier price updates and triggers threshold matching.
  • FR-2GET /watches/{route_id} — Queries active user target thresholds and recent route price history.
  • FR-3PATCH & DELETE /fares/{route_id} — Updates, revokes, or deletes route_id entries with bounded TTL or explicit cache/index invalidation.
  • FR-4Must decouple flash-sale repricing floods and survive 6x backing storage latency brownouts.

Workload Profile

Baseline Feeds28,000 Read RPS / 10,000 Fare Write RPS
Flash-Fare Flood74,000 Read RPS / 30,000 Write RPS
Active Working Set26 GB active route watchlists & min-price state
Traffic DistributionSkewed updates on popular holiday route_id corridors

Consistency Model

Eventual alert evaluation (< 5s) acceptable; fare updates and user watch subscriptions must persist durably.

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