Design a Hotel Booking
Design a site where guests search for hotels by place and dates, see which rooms are free and at what price, hold a room, pay, and get a confirmation. Hotels, or the channel managers that act for them, load their rooms, nightly prices and rules, and can change them at any time. Guests can view and cancel their bookings.
The site lists 500,000 hotels and takes 1 million bookings a day, but for every booking there are about 100 searches. The hard part is the split between the two: searches are huge in number and can be a few seconds stale, while a booking is small in number but must never sell the same room twice, even when 1,000 people chase the last rooms of a hotel in a flash sale, and even when the same rooms are also being sold on other sites.
Good questions to ask first
Decide what you would assume for each before you look at ours.
- 1Do guests book a specific room or a room type?
- 2How many hotels, searches and bookings?
- 3How far ahead can guests book?
- 4Do guests pay now or at the hotel?
- 5Can we overbook?
- 6How fresh must search results be?
- 7Do hotels sell the same rooms elsewhere?
- 8Can a booking be cancelled?
How to spend the 45 minutes
- 5minPart 1: Requirements and scope
- 5minPart 2: Estimates
- 5minPart 3: API
- 15minPart 4: Architecture, stage by stage
- 15minPart 5: Deep dives and trade-offs