•CASE STUDY

Flight Search Platform (Google Flights / Kayak)

4 min read·738 words·Advanced

Asked at

1 candidate report in Oct 2025

How to use this case study

SDE-2 / Mid

  • Explain searching flights between two cities on a date
  • Getting fares from airlines/GDS
  • Caching results

SDE-3 / Senior

  • Go deeper on building multi-leg itineraries (graph search with connection times)
  • Fare caching and freshness
  • Ranking by price and duration

Staff / Principal

  • Discuss the cost of live fare queries
  • Precomputation vs on-demand
  • Price verification before booking
  • Scaling during peak travel seasons

Problem RestatementProblem

Meta asked: design a flight search platform. A user searches for flights from one city to another on given dates (one-way or round-trip), with filters (stops, airlines, times), and sees results sorted by price, duration or a "best" score. Results include connecting itineraries (e.g., BLR → DXB → LHR). Flight schedules change slowly, but prices and seat availability change constantly and are expensive to query from airlines and GDS systems (global distribution systems like Amadeus/Sabre, which sell airline inventory).

RequirementsRequirements

  • Search by origin, destination, dates, passengers and cabin.
  • Return direct and connecting itineraries with prices, sorted and filtered.
  • Latency: a first set of results in ~1–2 seconds.
  • Prices must be verified before booking.
  • Handle huge query volume (much of it browsing) without huge fare-query costs.

ArchitectureArchitecture

Architecture diagram
%%{init: {"look":"handDrawn","handDrawnSeed":7,"theme":"base","fontFamily":"Virgil, \"Segoe Print\", \"Comic Sans MS\", cursive","themeVariables":{"fontFamily":"Virgil, \"Segoe Print\", \"Comic Sans MS\", cursive","fontSize":"16px","primaryColor":"#fff4e6","primaryBorderColor":"#1e1e1e","primaryTextColor":"#1e1e1e","secondaryColor":"#e7f5ff","tertiaryColor":"#ebfbee","lineColor":"#1e1e1e","textColor":"#1e1e1e","mainBkg":"#fff4e6","nodeBorder":"#1e1e1e","clusterBkg":"#f8f9fa","edgeLabelBackground":"#ffffff","classText":"#1e1e1e"}}}%%
flowchart LR
    U["Users"] --> API["Search API"]
    API --> QC[("Search result cache")]
    API --> IB["Itinerary builder - graph search"]
    SCH[("Schedule graph - flights, times")] --> IB
    IB --> PR["Pricing layer"]
    PR --> FC[("Fare cache - with age")]
    PR -->|"cache miss / stale"| GDS["GDS / airline APIs"]
    ING["Schedule ingestion - daily"] --> SCH
    U -->|"select itinerary"| VER["Price verification - live check"]
    VER --> GDS

"Flights from Delhi to Lisbon on 12 March" hides two very different questions: which journeys are possible, and what each one costs right now. Treating them as one is what makes flight search slow.

Weak

Price every possible itinerary live

Enumerate itineraries and call the pricing system for each.

Architecture diagram
%%{init: {"look":"handDrawn","handDrawnSeed":7,"theme":"base","fontFamily":"Virgil, \"Segoe Print\", \"Comic Sans MS\", cursive","themeVariables":{"fontFamily":"Virgil, \"Segoe Print\", \"Comic Sans MS\", cursive","fontSize":"16px","primaryColor":"#fff4e6","primaryBorderColor":"#1e1e1e","primaryTextColor":"#1e1e1e","secondaryColor":"#e7f5ff","tertiaryColor":"#ebfbee","lineColor":"#1e1e1e","textColor":"#1e1e1e","mainBkg":"#fff4e6","nodeBorder":"#1e1e1e","clusterBkg":"#f8f9fa","edgeLabelBackground":"#ffffff","classText":"#1e1e1e"}}}%%
flowchart LR
  Q["DEL to LIS, 12 March"] --> EN["Enumerate itineraries - thousands with 1-2 stops"]
  EN --> PR["Price each one live"]
  PR --> SLOW["Thousands of calls to a slow, rate-limited pricing system"]
  SLOW --> TO["Search takes tens of seconds or times out"]
  PR --> COST["Most priced itineraries are never shown"]

Pricing is the expensive, rate-limited, slowly-responding part, and this design calls it for results nobody will look at. It also couples a question that changes daily — which flights exist — to one that changes by the minute.

Good

Cache the prices

Keep recently returned prices and serve them from cache.

Latency improves and a new failure appears: fares change constantly, so a cached price is often wrong by the time it is displayed. The user selects a $612 fare and is told at checkout that it costs $740 — the single most damaging experience a travel site can produce, and it gets worse the more aggressively you cache.

Best

Separate the slow-changing graph from the fast-changing prices

Architecture diagram
%%{init: {"look":"handDrawn","handDrawnSeed":7,"theme":"base","fontFamily":"Virgil, \"Segoe Print\", \"Comic Sans MS\", cursive","themeVariables":{"fontFamily":"Virgil, \"Segoe Print\", \"Comic Sans MS\", cursive","fontSize":"16px","primaryColor":"#fff4e6","primaryBorderColor":"#1e1e1e","primaryTextColor":"#1e1e1e","secondaryColor":"#e7f5ff","tertiaryColor":"#ebfbee","lineColor":"#1e1e1e","textColor":"#1e1e1e","mainBkg":"#fff4e6","nodeBorder":"#1e1e1e","clusterBkg":"#f8f9fa","edgeLabelBackground":"#ffffff","classText":"#1e1e1e"}}}%%
flowchart LR
  SSIM["Airline schedules - ingested daily"] --> G[("Flight graph - airports as nodes, flights as edges")]
  Q["Query"] --> SEARCH["Time-aware graph search"]
  G --> SEARCH
  SEARCH --> MCT["Respect minimum connection time, max stops, max duration"]
  MCT --> SHORT["Shortlist - tens of itineraries"]
  SHORT --> PRICE["Price only the shortlist - live, in parallel"]
  PRICE --> RES["Results with fares"]
  RES --> SEL["User selects"]
  SEL --> REPRICE["Re-price that itinerary before checkout - authoritative"]
  • Schedules are a graph problem. Airports are nodes and flights are edges with times; a query is a time-aware search where each next departure must follow the previous arrival plus the airport's minimum connection time. This runs on data ingested once a day and needs no external calls.
  • Price only what will be shown. Constraining to a few tens of candidates first turns thousands of pricing calls into a manageable parallel fan-out with a deadline.
  • Re-price at selection. The displayed fare is an estimate with a timestamp; the authoritative price is fetched when the user picks an itinerary, before payment. That makes cached prices safe, because nothing is ever charged from the cache.

Pre-compute connections for popular routes so the graph search is a lookup for the queries that make up most of the traffic. The long tail runs the full search and is rare enough to afford it.

Search FlowFlows

  1. Check the result cache for the same query (short TTL, minutes).
  2. Build candidate itineraries from the schedule graph (direct + 1-stop + 2-stop).
  3. Price them from the fare cache. For important candidates with missing or stale prices, call the GDS in parallel with a time budget.
  4. Rank: price, total duration, number of stops and departure time preferences. A "best" score combines them.
  5. Return the first results fast, then stream in more as live prices arrive (progressive loading).
  6. When the user selects an itinerary, verify the price and availability with a live call before booking. If the price changed, tell the user.

Scaling and Cost

  • Look-to-book ratio is huge (thousands of searches per booking), so caching is the main cost control.
  • Rate limits and budgets per GDS, and prioritize live queries for high-intent searches.
  • Shard the search service by region, and scale out for seasonal peaks.
  • Precompute "cheapest per date" calendars for popular routes (the price calendar view) from the fare cache.

Wrap-UpWrap-up

Separate schedules from prices. Build itineraries with a time-aware graph search over a daily-ingested flight graph (respecting connection times and stop limits), and price them mostly from a fare cache with fetch timestamps, refreshing popular routes proactively and calling GDS/airline APIs live only for important stale results within a time budget. Rank and stream results, cache whole searches briefly, and always verify price and availability live before booking.

More Case Studies

Frequently Asked Questions

What is the Flight Search Platform (Google Flights / Kayak) system design question?

Flight Search Platform (Google Flights / Kayak) is a system design interview question asked at FAANG companies. It covers search, caching, data pipelines, algorithms and tests your ability to design scalable, production-ready systems. InterviewSkool's breakdown walks you through requirements, API design, architecture, and trade-offs.

Which companies ask the Flight Search Platform (Google Flights / Kayak) question?

Meta have reportedly asked variations of this question in system design interviews. The exact wording may differ, but the core design challenges remain the same.

How should I prepare for the Flight Search Platform (Google Flights / Kayak) interview question?

Start with the problem statement and scale estimates, then design the high-level architecture. Focus on the core components, data model, and API design. InterviewSkool's breakdown covers the full solution with mermaid diagrams and trade-off analysis to help you prep efficiently.

What level is the Flight Search Platform (Google Flights / Kayak) question?

This question is suitable for SDE-2, SDE-3, and Staff engineer interviews. The level guidance on this page provides specific tips for each level — SDE-2 candidates should focus on core architecture, while Staff engineers should discuss trade-offs, monitoring, and incremental rollouts.

Practice with a Mock Interview

Apply what you learned in a live system design mock interview with InterviewSkool's AI interviewer.

Start System Design Interview →