HLDArena
HLD-239·Search & Indexing
Medium · 1,000 pts

Global Airline Fare Cache & Multi-Leg Search Aggregator

Design a Google Flights / Skyscanner search backend serving sub-60ms route-date fare matrices while airline GDS feeds continuously push seat-class repricing.

Max p99
≤ 55 ms
Availability
≥ 99.5%
Budget
≤ $5,600

Functional Requirements

  • FR-1GET /flights/search?route={route_date} — Returns ranked non-stop and 1-stop fare options.
  • FR-2POST /flights/fares/update — Applies live airline GDS fare-bucket updates.
  • FR-3PATCH & DELETE /flights/search/{route_date} — Updates, revokes, or deletes route_date entries with bounded TTL or explicit cache/index invalidation.
  • FR-4Must absorb holiday travel search spikes and isolate 6x GDS backing store latency brownouts.

Workload Profile

Baseline Searches35,000 Search Read RPS / 4,000 GDS Fare Write RPS
Holiday Travel Rush98,000 Read RPS / 11,000 Write RPS
Active Working Set28 GB hot origin-destination-date fare matrices
Traffic DistributionHeavy Zipfian skew on popular trunk route_date pairs (SFO-JFK, LHR-DXB)

Consistency Model

Bounded eventual fare cache (< 10s) on search browse; final fare verified on checkout redirect.

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