System Design: Cheapest Flight Search Across Multiple Providers
Context
Design a backend system that searches multiple flight providers (airlines, OTAs, GDS/aggregators) to return the cheapest flight tickets for users. The system must handle a high volume of queries, volatile prices, and frequent updates while remaining scalable and cost-efficient.
Requirements
-
Inputs: origin, destination, departure date(s), return date(s), cabin class, number of stops.
-
Date flexibility: exact dates or flexible windows (e.g., ±3 days) and calendar view.
-
Core outputs: list of itineraries/offers sorted by price with filters, plus a fast “cheapest per day” calendar.
-
System concerns to describe:
-
High-level architecture: ingestion from providers, normalization, deduplication, search index.
-
APIs: search, quote/validate (re-price), and ancillary endpoints.
-
Caching strategy.
-
Data freshness and update propagation.
-
Rate limiting, retries, and resilience patterns.
-
Consistency vs availability trade-offs.
-
Scalability and cost-control strategies.
-
Schemas and indexes that enable fast queries and rapid price updates.