Hotel Booking
Search-heavy availability lookups feeding a contended reservation path.
Keep searches and reservations flowing through a holiday booking rush while the reservations store blips and a booking node dies.
Availability searches vastly outnumber reservations, and both share one front door. The search index answers 'which rooms are open', while a cache in front of the reservations store keeps hot itineraries out of the database — the only reason a store blip during the rush isn't a total checkout freeze.
Components in play
- Booking gateway — One front door for search and reserve traffic; spreads it across the fleet.
- Booking service — Runs availability searches and takes reservations.
- Search/reserve fan-out — Splits booking-service output between the search index and the itinerary cache so neither branch starves.
- Availability index — Answers 'which rooms are open on these dates' without touching the store.
- Itinerary cache — Holds hot rates and itineraries so reads skip the reservations store.
- Reservations store — Source of truth for bookings and room inventory.
Graded on these SLOs
- ≥ 97.50%Bookings succeed
- ≤ 120 msSearch-to-book p99
- ≥ 7.0k rpsServe the rush
- ≤ 90%Fleet headroom
- ≤ 9Lean footprint
The brief
Design a hotel booking service: travelers search 'which rooms are open on these dates' far more often than they book, and both share one front door. When a holiday booking window opens, searches spike hard and the reservation store — the only thing that must never double-book a room — can't be on the critical path for reads.
Functional
- Search room availability for a date range
- Reserve a room and confirm the booking
- Show live rates and itineraries
Non-functional
- Searches vastly outnumber bookings
- A room is never double-booked, even under contention
- Stays responsive through holiday-window traffic spikes
Warm-up: design decisions
Optional theory to prime the calls a senior engineer would make before you build.
Solving is a Pro feature
Unlock the on-canvas AI design coach, per-run design reviews, the chaos simulator and all 12 problems for $15/month.
- AI design coach on your canvas — pins failure points & over-engineering
- Honest AI design review on every run
- All 12 problems + unlimited chaos simulator
- Points, levels & leaderboard