SevyDevy

Design a hotel reservation system

PremiumLow-level designMedium

  • Double booking
  • Interval overlap
  • Booking systems

Quick answer

This low-level design interview question asks you to design a hotel reservation system. Aim for a design that is modelled as clear classes, interfaces and relationships that can handle new requirements without a rewrite. Interviewers want to see how you name responsibilities, keep classes small and reason about change.

The problem

Hotel reservation system low level design: build the object model for booking rooms across a chain of 50 hotels. Guests search a room type for a date range, hold a room while paying, confirm, check in and check out. The hard parts are preventing double booking under concurrency and fast availability checks.

Guests can cancel under a cancellation policy. The front desk can walk in a guest, upgrade a room and block rooms for maintenance.

What must a hotel reservation system do?

  • Search: Given a hotel, a room type and a check-in and check-out date, return the number of rooms of that type free on every night of the stay.
  • Hold and book: Hold a specific room (or one of a type) for 10 minutes while the guest pays; confirm when payment succeeds; release the hold when it expires.
6 more requirementsUnlock to see all

How well must it do it?

  • No double booking: Two guests must never hold the same room for overlapping nights, even with concurrent requests.
  • Fast availability: Checking availability for a 7-night stay in a 300-room hotel must not scan every reservation ever made.
2 more requirementsUnlock to see all

What scale should you design for?

Use these numbers in your estimates.

The scale numbers unlock with this questionUnlock

Key concepts

  • Double booking
  • Interval overlap
  • Booking systems
  • State machine
  • Strategy pattern
  • Concurrency

How you’ll practise

6 short steps · save and come back any time
  1. Requirements
  2. Core objects
  3. Class relationships
  4. Key flows
  5. Extensibility
  6. Wrap-up

Lala, personalized to you, gives a hint when you ask and reviews your design when you are ready.

What do interviewers look for?

In any low-level design round.

  • Lists the use cases before writing classes
  • Gives each class one clear responsibility
  • Uses interfaces where behaviour is likely to change
  • Applies a design pattern only when it solves a real problem
  • Handles edge cases and invalid states explicitly
  • Walks through one use case end to end with the model

Questions people ask about this interview question

Which design type is this question?
It is a low-level design question. You design a hotel reservation system and explain your choices the way you would in an interview.
Is this question asked at entry level?
It is marked Medium. Entry-level engineers can practise it, but it expects you to reason about requirements and trade-offs, not only list components.
What should I cover first?
Start with the use cases and the core entities, then the responsibilities of each one. Agree on scope with the interviewer before you design anything.
Can I practise it for free?
It is a premium question. Sign up and unlock it once for 10 credits; it then stays unlocked. When you finish, Lala, your personalized AI mentor, can review your design for 30 credits.

Related questions

Updated · Written by the SevyDevy team

Premium questionSign up free, then unlock it