Hotel Booking System

Search and book hotel rooms across date ranges without double-booking.

Medium45 minDate-range availabilityPricing strategyOptimistic locking

Design a hotel booking system like a simplified Booking.com or OYO: search hotels by city and dates, see available room types and prices, and book without double-booking. The tricky parts are date-range availability, pricing rules, and concurrency on popular dates.

Requirements

Functional

  • Hotels have room types (Deluxe, Suite) with a count of physical rooms and amenities.
  • Search by city, check-in and check-out dates, guests; return hotels with available room types and total price.
  • Book a room type for a date range; assign a specific room at check-in (or at booking).
  • Pricing varies by date (weekend, season, demand) and can include discounts and taxes.
  • Cancel with a policy (free until 24 hours before, otherwise one night charged).
  • Payment: pay now or pay at hotel.

Non-functional

  • No overbooking of a room type on any night (unless the hotel explicitly allows an overbooking buffer).
  • Search is read-heavy and should be fast; booking must be strongly consistent.
  • Booking and payment calls are idempotent.

Try it first

Set a timer, sketch your own design on paper, then compare it with the reference walkthrough.

45:00

Complete & continue

Defend it out loud

The AI interviewer will probe your design for Hotel Booking System and score it.

Mock interview