← Questions
Design a flight search service
0
I was asked this
No reports yet. Sign in to say where you were asked it.
A system design interview question asked in Meta's system design round, last asked Oct 2025. It tests search, caching and third-party apis.
Design a flight search service. Users enter an origin, a destination and dates (one-way or round trip) and see available flights with prices, which they can sort and filter. The fares come from many airlines and booking providers, each with its own API, speed and reliability.
Requirements
- Functional: search by origin, destination, dates and passenger count. Return itineraries with price, times, stops and airline.
- Functional: sort by price, duration or departure time. Filter by stops, airline and time of day.
- Functional: confirm the live price and availability when the user picks a flight.
- Non-functional: results in about 1 to 2 seconds at high query volume, with traffic peaks around holidays.
- Non-functional: prices in results may be a little stale, but the price at checkout must be exact.
- Non-functional: one slow or failing provider must not break search.
Clarifying questions
- Do we build itineraries with connections ourselves, or do providers return complete itineraries?
- How many providers are there? Do they charge or rate-limit per query?
- How stale may a displayed price be?
- Do we book flights, or hand users off to the airline?
- Flexible dates ("cheapest in March")?
What a strong answer covers
- The core choice between querying providers live on every search and keeping a fare cache or index, refreshed by schedule data and by provider feeds. The decision should name the freshness and cost trade-off.
- A search service that fans out to provider adapters in parallel, with timeouts, circuit breakers and partial results.
- A cache of search results keyed by route, date and passenger count with a short TTL, and pre-warming for popular routes.
- Ranking and filtering on the merged results, and pagination.
- Price confirmation at selection time, plus handling the case where the price changed.
- Data stores: schedules and the fare index, search logs for popular routes, and how each one scales.
Follow-ups
- Support flexible dates: the cheapest days in a month for a route.
- Build multi-leg itineraries from single flights. How do you bound the search?
- Price alerts: notify users when a route gets cheaper.
- A provider returns wrong prices for an hour. How do you detect it and limit the damage?
Where it's asked
- Meta · System design · Last asked Oct 202545 min · Design discussion; either an LLM-agent system or a classic product system · Nominally AI-enabled, but the assistant is often not used
What it tests
No official answer yet. Draw yours on the right; publish it and it shows under Community.
Nothing published yet. Publish your canvas and it shows here for others to open and remix.
Draw your answer hereBoxes, arrows and notes, saved for you to come back to.Sign in to start drawing
