Phase 1 — Clarify & Scope
Interviewer: Design a hotel reservation system — think Booking.com or Expedia. What do you want to clarify?
Candidate: A few questions to scope this:
- Are we building the full platform (search + booking + inventory management) or a specific component?
- What's the scale — how many hotels, rooms, and bookings per day?
- Do we need real-time room availability, or can we tolerate slight staleness?
- What's the consistency requirement — is double-booking catastrophic, or can we overbooking-compensate like airlines?
- Multi-currency and multi-language?
Interviewer: Full platform — search, availability check, booking creation and cancellation. 500,000 hotels globally, 10 rooms average = 5 million rooms. 10 million bookings per day. Real-time availability required — double-booking is unacceptable (unlike airlines). Single currency/language for now.
Candidate: Let me size this:
Search queries vastly outnumber bookings (100:1 ratio):
Room-nights stored (assuming average 3-night stay, 90-day search window):
Interviewer: What are the core functional requirements?
Candidate:
- Search hotels by location, dates, and filters (price, rating, amenities)
- Check real-time room availability for a date range
- Create a reservation (hold → confirm → paid)
- Cancel a reservation with refund processing
- Hotel management API: add/update room inventory, pricing
Non-functional:
- Search: <…
In the full tutorial
- Phase 2 — High-Level Architecture
- Phase 3 — Deep Dive & Evolution
- Phase 4 — Robustness & Operations