Design a Hotel Booking Service - System Design Mock Interview (with eBay EM)

Design a Hotel Booking Service - System Design Mock Interview (with eBay EM)

Designing a Hotel Booking Service

In this transcript, the speaker discusses the functional and non-functional requirements for designing a hotel booking service. They also estimate the amount of data that would need to be stored and discuss some potential challenges.

Functional Requirements

  • The system should allow users to view hotel pages, add hotels, delete hotels, and update hotels.
  • The system should allow users to search for hotels and book rooms.
  • The system should prevent double bookings by assigning room numbers during check-in.

Non-Functional Requirements

  • The system should be highly scalable and fast, with search results loading in under 150 milliseconds.
  • The system should have proper identity access management systems in place for security purposes.
  • The system should have DDoS protection and rate limiting to prevent attacks.

Backend Estimation

  • There could potentially be one million hotels with 100 rooms each, resulting in around 100 million rooms total.
  • If reserving five million room types per day over ten years, there would be around 180 billion rooms total.

Data Storage and Model

In this section, the speaker discusses the data storage and model required for the hotel reservation system.

Inventory and Room Types

  • The system would require an inventory or storage to keep track of available rooms.
  • Hotels will have a lot of images that need to be stored, which cannot be done in a relational database. S3 can be used for image storage.
  • For each room type on a given date, there should be information on how many rooms are available and how many are reserved.

Reservation Table

  • A reservation table is needed to store information about reservations made by users.
  • Information such as the hotel ID, start date, end date, and room type ID should be included in the reservation table.

System Design

In this section, the speaker discusses the system design for the hotel reservation system.

Services and Load Balancer

  • The system will have multiple services such as an inventory service and a view hotel service.
  • Each service will have its own load balancer to handle incoming requests.

Experience Layer

  • An experience layer will be created to provide a consistent user interface across different platforms such as mobile web or desktop web.

Payment Processing

In this section, the speaker briefly mentions payment processing for hotel reservations.

Payment Processing

  • No bullet points with timestamps were provided in this section.

Reservation and Inventory Services

In this section, the speaker discusses the need for a reservation database that talks to the inventory to ensure that both are in sync with each other. The speaker also explains different approaches to creating a reservation service and how it can be integrated with an inventory service.

Microservice-based Architecture

  • A microservice-based architecture can be used where the reservation service has a dedicated database.
  • If transactions are involved, having them on the same server would make life easier.
  • However, bigger companies usually have different teams managing viewing and reservation parts, so separate databases and storages are preferred.

Reservation Service States

  • Reservation service will have states such as pending, complete, or cancel.
  • Payment failure will trigger an event queue that listens to payment failed topics.
  • As soon as events happen, appropriate service calls will be made to update the state of reservations and inventory.

User Experience Layer

In this section, the speaker explains how users interact with different services when booking a hotel.

Booking Process

  • When a user books a hotel, they interact with different services through UI screen experience layer.
  • The user's request is sent to both reservation and inventory services.
  • The available count is checked against requested count in the inventory table before updating it.

[CUTOFF_LIMIT]

Turn any video into a summary like this

YouTube links, meetings, lectures. With transcripts, search, and chat.

Video description

Make sure you're interview-ready with Exponent's system design interview prep course: http://bit.ly/42Wsa3x An experienced engineering manager at eBay demonstrates how to design a hotel booking service. He walks us through his thought process and shares his insights on designing a scalable and efficient system. Chapters (Powered by ChapterMe) - 00:00 - Intro 04:23 - How much storage would a hotel have for its room inventory? 17:08 - Booking a Hotel 23:36 - Booking System Speed Up 26:32 - Other than the scalability, 28:34 - Interview analysis 29:06 - System Design Tips Watch more system design videos here: - Meta engineering manager answers a rate limiter interview question: https://youtu.be/SgWb6tWx3S8 - Google SWE answers an algorithms interview question: https://youtu.be/NRRyk0XqkkA - Google TPM answers Tiktok system design interview question: https://youtu.be/Z-0g_aJL5Fw - Flipkart EM “Design Amazon Prime Video” system design interview question: https://youtu.be/PuU_0esYyhg 👉 Subscribe to our channel: http://bit.ly/exponentyt 🕊️ Follow us on Twitter: http://bit.ly/exptweet 💙 Like us on Facebook for special discounts: http://bit.ly/exponentfb 📷 Check us out on Instagram: http://bit.ly/exponentig 📹 Watch us on TikTok: https://bit.ly/exponenttiktok ABOUT US: Did you enjoy this interview question and answer? Want to land your dream career? Exponent is an online community, course, and coaching platform to help you ace your upcoming interview. Exponent has helped people land their dream careers at companies like Google, Microsoft, Amazon, and high-growth startups. Exponent is currently licensed by Stanford, Yale, UW, and others. Our courses include interview lessons, questions, and complete answers with video walkthroughs. Access hours of real interview videos, where we analyze what went right or wrong, and our 1000+ community of expert coaches and industry professionals, to help you get your dream job and more!