Circle Interview Question|Ticket Reservation API Design & Flight Booking System Design (High-Frequency System Design / Backend / API Design)

30 Views
No Comments

Problem 1 — Ticket Reservation API Design

Codewriting

How do you design the API/backend for a ticket reservation app?
Examples include movie tickets or concert tickets.
The app should allow users to hold their ticket(s) for 10 minutes before booking.

  • Execution time limit: 2 seconds (plaintext)
  • Memory limit: 1 GB

Problem 2 — Third-Party Airline Booking APIs

3-party APIs

Suppose we want to design an automated flight-booking service for our clients.
Our job is to book the cheapest flight for a given origin, destination, and departure date.
We can get flight data and create bookings using many different third-party Airline booking APIs.


Problem 1 — Ticket Reservation App (10-Minute Hold)

Key ideas:

  1. Core entities
    • Seat → available/held/booked
    • Hold (expires after 10 minutes)
    • Reservation (after payment)
  2. Architecture
    • Hold Manager with TTL
    • Reservation Manager
    • Atomic seat updates to prevent oversell
    • Background expiration cleaner
  3. Important APIs
    • POST /hold → place a temporary hold
    • POST /reserve → convert hold to booking
    • DELETE /hold/{id} → release
    • Query APIs for seat availability and user state
  4. Consistency
    • Use Redis/DynamoDB conditional updates
    • Ensure no overbooking even under concurrency

Problem 2 — Automated Flight Booking via Multiple Providers

Key ideas:

  1. Layered system
    • Aggregator queries multiple providers concurrently
    • Normalization layer standardizes responses
    • Booking Orchestrator completes multi-step reservations
  2. Search flow
    • Parallel API calls
    • Deduplicate & sort results
    • Pick cheapest flight
  3. Booking flow
    • Hold seat
    • Confirm booking
    • Rollback if provider fails
  4. Reliability
    • Retry, timeout, circuit breaker
    • Full logging + metrics

The VOprep team has long accompanied candidates through various major company OAs and VOs, including Meta, Amazon, Citadel, SIG, providing real-time voice assistance, remote practice, and interview pacing reminders to help you stay smooth during critical moments. If you are preparing for these companies, you can check out our customized support plans—from coding interviews to system design, we offer full guidance to help you succeed.

END
 0