Start Here

Tier 1 · Building Blocks

Scale Reads

Scale Writes

Database Selection

Traffic Control

Consistency & Coordination

Estimation

Tier 2 · Core Systems

Tier 3 · Location & Real-Time

Tier 4 · Infrastructure & Data

Tier 5 · Finance & Commerce

Tier 6 · Advanced & Collaborative

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:

  1. Are we building the full platform (search + booking + inventory management) or a specific component?
  2. What's the scale — how many hotels, rooms, and bookings per day?
  3. Do we need real-time room availability, or can we tolerate slight staleness?
  4. What's the consistency requirement — is double-booking catastrophic, or can we overbooking-compensate like airlines?
  5. 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:

Booking rate=10M bookings/day86,400≈116 bookings/sec average\text{Booking rate} = \frac{10\text{M bookings/day}}{86{,}400} \approx 116 \text{ bookings/sec average}

Peak booking rate (10× average)≈1,160 bookings/sec\text{Peak booking rate (10× average)} \approx 1{,}160 \text{ bookings/sec}

Search queries vastly outnumber bookings (100:1 ratio):

Search queries=116×100=11,600 searches/sec average\text{Search queries} = 116 \times 100 = 11{,}600 \text{ searches/sec average}

Room-nights stored (assuming average 3-night stay, 90-day search window):

Availability records=5M rooms×90 days=450M records\text{Availability records} = 5\text{M rooms} \times 90 \text{ days} = 450\text{M records}

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

Glossary history

Click dotted jargon to save explanations here.