Swiggy Interview Experience - Low-Level Design (LLD)

Author Profile Pic
Anurag
Published on Sat Feb 15 2025 ~ 3 min read
Swiggy Interview Experience - Low-Level Design (LLD)

I recently had an LLD interview with Swiggy, where I was asked to design an online ticket booking system similar to BookMyShow. The interview focused on designing a scalable, efficient, and maintainable system while covering essential OOP principles, database design, and API structuring.


Question:

Design and implement an online ticket booking system similar to "Book My Show" . The system should support the following functionalities:

  • User Registration and Authentication: Users should be able to register, log in, and manage their accounts.
  • Event Management: Admins should be able to create, update, and delete events.
  • Each event should have details such as name, description, date, time, venue, and available seats.
  • Seat Booking: Users should be able to view events, select seats, and book tickets.
  • Payment Handling (Optional): The system should handle secure payment processing for ticket purchases.
  • Booking Confirmation: Once payment is successful, a booking confirmation should be sent to the user.


Before diving into the system design, the interviewer emphasized discussing the non-functional requirements (NFRs):


  • Scalability: The system should support thousands of concurrent users booking tickets for various events across multiple locations.
  • Availability: It should be highly available with minimal downtime to ensure users can book tickets anytime.
  • Consistency: Since multiple users can book the same event simultaneously, the system should ensure seat availability consistency.
  • Performance: The system should have low latency when fetching event details and processing bookings.
  • Security: User data, payment information, and transaction details must be secure and encrypted.
  • Extensibility: The system should allow easy integration of new features, such as loyalty programs or discount coupons.
  • Fault Tolerance: The system should handle failures gracefully and provide proper rollback mechanisms for failed transactions.


Functional Requirements -

The system should support the following functionalities:


1. User Registration and Authentication

  • Users should be able to sign up, log in, and manage their profiles.
  • Support for authentication mechanisms like JWT tokens, OAuth, or session-based authentication.


2. Event Management (Admin Feature)

  • Admins should be able to create, update, and delete events.
  • Each event should have:
  • Name
  • Description
  • Date and time
  • Venue (with city and location details)
  • Available seats (categorized as VIP, General, Balcony, etc.)


3. Seat Booking

  • Users should be able to:
  • Browse events by date, category, or location.
  • View seating layout and select seats.
  • Check seat availability in real time.
  • Book tickets, ensuring no overbooking.

4. Payment Handling (Optional)

  • Secure payment processing using payment gateways like Razorpay, Stripe, or PayU.
  • Users should receive a confirmation after successful payment.
  • Handle failed transactions and refunds.


5. Booking Confirmation

  • Once a booking is confirmed, a ticket confirmation email/SMS should be sent.
  • Users should be able to view their booked tickets in their profiles.

Comments


Loading...

Post a Comment

Address

Nirvana Apt, Hinjeadi, Pune, Maharastra - 411057 (India)

Website
Site : www.anucodes.in
Social