System Design Notes
Don’t forget to get your copy of Designing Data Intensive Applications the single most important book to read for system design interview prep!

Amazon/ Ebay/ Flipkart Design

E-commerce applications are getting exceedingly popular in today's fast-paced business environment, with Amazon being the unparalleled industry leader. From consumer goods and digital media to grocery items, almost everything is available on Amazon these days.

So how do you build a similar online shopping system that stores an inventory of products under different categories, allow customers to search through them, and make purchases. Furthermore, how do you handle the expanding load on the website and prevent it from crashing down, particularly on busy days, such as the Black Friday Sale?

Read this blog to understand how Amazon, Flipkart or a similar e-commerce application is designed.

What Are The Requirements Of The System

Though Amazon is a multifaceted platform that offers an exhaustive range of products and services, for the sake of simplicity, we will only try to understand and recreate a simpler version of their online retail business. An online retail platform or e-commerce application allows users to buy and sell products.

Functional Requirements

Here are the basic features an e-commerce website should include:

  • Sellers should be able to add, delete and modify products they want to sell.
  • The website should include a catalog of products.
  • Buyers can search products by name, keyword or category.
  • Buyers can add, delete or update items in a cart.
  • Buyers can purchase items in the cart and make payments.
  • Buyers can view their previous orders.
  • Buyers can review and rate purchased products.

Non Functional Requirements

  • High availability
  • High consistency
  • Low latency

Maintaining all three non-functional requirements at all times is difficult, especially with the high traffic that the website will need to handle. However, different components of the system architecture can have different priorities.

For example, payment service and inventory management will need to be highly consistent. Availability is of low priority in this case. Search service, on the other hand, should be highly available and have low latency, even at the cost of consistency. In other words, it's acceptable if the search service is eventually consistent.

Amazon System Architecture

Much like Uber or Airbnb's backend, Amazon and other e-commerce platforms also have two sides for the system. If you are a customer of Amazon, you can either be selling products through your own isolated store on Amazon, or you can be buying products available from different sellers.

E-Commerce Application's Selling-End Architecture

For the first half of Amazon design, let's discuss the selling-end of the architecture. This part of the architecture will serve the customers who visit the e-commerce application for selling their products or services.


Click here to continue reading this lesson on Medium.