Preparing your design workspace

Loading the problem and your latest saved attempt…

Design a Flight Search and Booking Aggregator

Design a fresh, paginated flight-search surface that safely turns one selected itinerary into one booking across external providers.

Problem statement

Design a flight search and booking aggregator. Search across heterogeneous external suppliers, normalize their offers, deduplicate the same flight while retaining the cheapest current option, stream useful results without waiting for the slowest supplier, and let a traveler book with one durable outcome.

For this exercise, assume 20 to 200 suppliers using JSON, XML, SOAP, or Protobuf; supplier responses may take minutes; supplier data may be reused for up to one hour; and the first useful results should reach the UI within 500 milliseconds at p95.

A serving instance may fail during an incremental stream, a supplier or cache may fail, and booking callbacks may be duplicated or delayed. Preserve stable search pagination and revalidate price and availability before booking.

What to build

  1. Aggregate and normalize flight offers from 20 to 200 heterogeneous suppliers without waiting for every supplier.
  2. Incrementally deliver stable flight identities while converging duplicates on the cheapest current offer.
  3. A client can resume an interrupted search stream without replaying or silently losing accepted results.
  4. Authenticate the traveler, revalidate the selected offer, and create at most one local booking for an idempotent request.
  5. Deduplicate callbacks and reconcile local booking state with the supplier's authoritative outcome.

At scale

  • Aggregate 20 to 200 suppliers whose protocols include JSON, XML, SOAP, and Protobuf and whose responses may take minutes.
  • Supplier data may remain valid for up to one hour, and useful results should be streamed before every supplier responds.
  • For this exercise, assume 5,000 search requests per second at peak, a 500-millisecond p95 first-result target, and a twenty-to-one search-to-booking ratio.
  • For this exercise, accepted booking intent must survive a zone failure; supplier calls may time out and callbacks may duplicate or arrive late.