Flight Booking System

Design a flight booking system that lets travelers search and book multi-leg itineraries across airlines, reserving fare-class seat inventory and issuing tickets without double-selling a seat or...

00

Practice checkpoints

The requirements are open as a taste. From the numbers onward, the full guide opens in the app.

  1. 01
    Clarify scope
  2. 02
    Requirements + scale
  3. 03
    API + data modelUnlocks in the app
  4. 04
    Draw architectureUnlocks in the app
  5. 05
    Deep diveUnlocks in the app
  6. 06
    Trade-off decisionUnlocks in the app
01

Requirements that shape the design

Do not only state requirements. Ask for them. Each card pairs the design constraint with a clarification question you can say out loud before drawing the architecture.

Functional requirements

01A trip has three legs on two airlines — is that one booking or three?

One itinerary: the traveler books the whole trip as a unit, but internally each leg is a separate hold against its owning airline — and either every leg tickets or the whole thing unwinds.

02How fresh does search have to be — are we querying airlines live?

Search reads cached availability that is stale by design; only the booking path re-validates live against the airline, and a shown fare is labeled as a quote, not a promise.

03Is the price shown at search time guaranteed?

Only inside a fare-quote window with an explicit expiry: book before it lapses and the price holds; after it, the system reprices and asks the traveler to confirm the new number.

04What are we actually selling — physical seats?

Fare-class buckets per leg (Y, B, M counts at the airline), not physical seats — a booking decrements a bucket, and seat maps only matter later at check-in.

05What order do hold, pay, and ticket happen — and what if one fails?

In that order — hold every leg, authorize payment, issue tickets — with each step idempotent and each paired with a compensating action (release, refund) so a failure never strands money or seats.

06Can a traveler cancel just one leg of a connected trip?

Yes, per the fare rules: cancelling one leg recomputes the connected itinerary and any refund, instead of silently leaving the traveler with an unreachable connection.

Out of scopePhysical seat assignment and check-in (inventory stays fare-class buckets until then) · Loyalty programs, miles redemption, and ancillary upsells (bags, meals, upgrades) · Airline revenue management — bucket sizing and deliberate overbooking tuned to no-show history (we enforce that policy, we do not set it)

Non-functional requirements

01How fast must search be, given 20 airline backends behind it?

Search answers in under ~500 ms p99 from the cache — it never waits on an airline; only booking pays live round-trip latency.

02Can we ever sell a seat the airline no longer has?

No phantom tickets: the airline is the system of record, the booking path re-validates live, and a cache-airline mismatch surfaces as sold-out-with-alternatives, never as a sale the airline never made.

03The saga dies halfway through — what state is left behind?

No orphan state: every hold carries a TTL at the airline, and compensating releases are durable retried jobs — the saga either completes or provably unwinds.

04A client retries the booking call — do we ticket twice or charge twice?

Retried booking, payment, and ticketing calls carry idempotency keys, so a network retry replays the stored answer instead of running the step twice.

05One airline API goes down — how much of the site goes with it?

One airline API being down degrades only itineraries touching it — adapters are isolated per provider with their own timeouts and circuit breaking.

Keep asking — the interview is a conversation

Real interviews probe far more than a tidy list. These are the scope questions that separate candidates who interrogate the problem from those who recite it.

  • Are we an agency booking against airline and GDS (global distribution system — the legacy network agencies book through) inventory, or the airline owning its own buckets? The distributed saga only exists in the first case.
  • Do itineraries span multiple airlines in one booking? That is the hard part — single-carrier trips are a much smaller problem.
  • How stale may search availability be — seconds or minutes — and is a booking-time sold-out-with-alternatives an acceptable experience?
  • How long do we honor a searched fare, and who absorbs the difference when the quote expires — us or the traveler?
  • If ticketing fails after payment is captured, do partner contracts let us retry inside the hold window, or must we refund immediately?
01

Unlock the full playbook for Flight Booking System

Numbers, architecture diagram, API and data model, deep dives, expected topics, self-check, whiteboard starter, and common mistakes unlock inside the app.

02

Numbers that force architecture decisions

Locked in the app

03

Architecture path

Locked in the app

04

API and data model

Locked in the app

05

Deep dive directions

Locked in the app

+Series

Practice the related series