System Design
10-Min Deep Dive

LLD of Swiggy Order Placement

Title Order Up! A Deep Dive into LLD of Swiggy Order Placement

SEO Keywords Swiggy, LLD, Microservices, Order Placement, Architecture Design, Software Development

Intro

In the fast-paced world of online food ordering, Swiggy has become a household name. As one of the leading food delivery platforms in India, Swiggy handles millions of orders daily. To ensure seamless order placement and processing, Swiggy's architecture is designed as a microservices-based system. In this blog post, we'll delve into the Low-Level Design (LLD) of Swiggy's Order Placement service, exploring how it works and what makes it efficient.

Blog Body

Swiggy's Order Placement service is responsible for processing user orders from the mobile app or website. The process involves several steps:

  1. Order Request: A user places an order through the Swiggy app or website.
  2. Validation: The Order Placement service validates the order details, such as location, menu items, and payment information.
  3. Availability Check: The service checks the availability of the ordered items at nearby restaurants.
  4. Restaurant Selection: Based on the availability check, a suitable restaurant is selected for the order.
  5. Order Creation: A new order is created in the database with the selected restaurant and menu items.
  6. Notification: The user receives a confirmation notification about their order.

To design this process efficiently, Swiggy's architecture employs a microservices-based approach:

  1. Order Placement Service: Handles order validation, availability checks, and order creation.
  2. Restaurant Availability Service: Provides real-time restaurant availability information.
  3. Payment Gateway: Handles payment processing for the order.
  4. Notification Service: Sends confirmation notifications to users.

Here's a simple diagram illustrating the Order Placement service:

                  +---------------+
                  |  User       |
                  +---------------+
                             |
                             |
                             v
                  +---------------+
                  | Order     |
                  | Placement  |
                  +---------------+
                             |
                             | Validate order details
                             | Check availability
                             | Select restaurant
                             | Create order
                             | Notify user
                             v
                  +---------------+
                  | Restaurant  |
                  | Availability|
                  +---------------+
                             |
                             | Provide real-time
                             | restaurant availability
                             v
                  +---------------+
                  | Payment    |
                  | Gateway    |
                  +---------------+
                             |
                             | Handle payment processing
                             v
                  +---------------+
                  | Notification|
                  +---------------+
                             |
                             | Send confirmation
                             | notifications to users

TL;DR

In this blog post, we explored the Low-Level Design (LLD) of Swiggy's Order Placement service. We examined the process of order placement, from validation to notification, and how Swiggy's microservices-based architecture enables efficient processing. By breaking down complex processes into smaller, manageable services, Swiggy can handle millions of orders daily with ease.

Propagate this knowledge. Link copied automatically on click.
LLD of Swiggy Order Placement - 10-Minute Engineering Brief | DevExCode | DevExCode