Design of MakeMyTrip (MMT)

Difficulty: MEDIUMCategory: HLDFrequency: 1Asked On 2024-06-30

Problem Statement

Designing a travel booking platform like MakeMyTrip (MMT) that enables users to search, compare, and book flights, hotels, buses, trains, and holiday packages. The system must support real-time availability, payments, scalability, and fault tolerance, while providing a seamless user experience across web and mobile.


🔶 Functional Requirements


1.User Management
•User registration, authentication, and profile management.
•Manage booking history, saved itineraries, and preferences.
2.Search & Discovery
•Flight search (one-way, round-trip, multi-city).
•Hotel search (by city, date, rating, price filters).
•Bus/train search with seat selection.
•Holiday package search.
3.Booking & Reservation
•Real-time seat/room availability checks.
•Booking confirmation with unique PNR/Booking ID.
•Handle cancellations, refunds, and rescheduling.
4.Payments
•Multiple payment methods (credit card, UPI, wallets).
•Integration with payment gateway.
•Support for partial payments, discounts, and coupons.
5.Third-Party Integration
•Connect with airlines, hotels, railways, bus operators through APIs.
•Real-time fare updates and availability sync.
6.Notifications & Communication
•Booking confirmation via email/SMS/app notifications.
•Reminders for upcoming trips.
•Alerts for delays, cancellations, or schedule changes.
7.Reviews & Ratings
•Allow users to rate hotels, flights, and packages.
•Show aggregated reviews to other users.


🔶 Non-Functional Requirements


•Scalability: Handle millions of daily searches and bookings.
•Performance: Search results must be returned in < 2 seconds.
•Availability: High availability (99.9% uptime SLA).
•Consistency: Ensure booking confirmation reflects accurate seat/room allocation.
•Security: Encrypt user data and secure transactions (PCI DSS compliance).
•Resilience: Fault tolerance for third-party API failures (fallbacks, retries).


🔶 Constraints


•Search traffic >> booking traffic (10x–20x higher).
•Must handle real-time updates from external providers.
•Need caching for frequently searched routes/destinations.
•Must avoid overbooking when multiple users book the same seat/room simultaneously.


🔶 Example Use Cases


1.User searches for flights Delhi → Mumbai on Jan 25 → system fetches and shows real-time results from multiple airlines with prices.
2.User books a hotel room → system reserves room via hotel API, processes payment, and generates booking confirmation.
3.User cancels flight booking → system processes refund and updates airline API.
4.Multiple users search for the same route → results served from cache to reduce API calls.
5.Airline API goes down → system retries gracefully or shows cached fares.


👉 Summary:

"Design a scalable and fault-tolerant travel booking platform like MakeMyTrip that allows users to search and book flights, hotels, buses, trains, and packages, integrates with third-party providers for real-time availability, handles payments and cancellations securely, and ensures high performance and reliability under massive traffic."

Solution

Comments