KHCA

From a Simple Click to a Global Digital Commerce Ecosystem.

Amazon system design architecture showing frontend, backend, databases, distributed systems and cloud infrastructure
Two students working on laptops while exploring how Amazon’s technology ecosystem, backend services, databases and cloud infrastructure work together.

Table of Contents

1.1 Amazon System Design: More Than an Online Shopping Website

When people hear the name Amazon, the first thing that usually comes to mind is online shopping. We open the Amazon website or mobile application, search for a product, compare prices, read customer reviews, place an order and wait for it to arrive at our doorstep.

From a customer’s perspective, the entire process looks simple. A few clicks are enough to purchase almost anything, from a mobile phone to a laptop, books, clothes or household products.

But have you ever wondered what actually happens behind the screen when you click the Buy Now button?

Let’s understand this through a practical example.

Imagine you want to purchase a laptop worth ₹50,000. You open Amazon, type “Laptop” in the search bar and receive hundreds or even thousands of product results. You apply filters, compare specifications, check customer ratings, read reviews and select a laptop that matches your requirements.

You add the product to your cart, enter your delivery address, choose a payment method and confirm the order.

Within a few seconds, Amazon displays an order confirmation message.

It looks like one simple shopping activity. But from a technology perspective, it involves several interconnected systems working together.

Behind this single purchase, Amazon’s e-commerce technology needs to coordinate multiple operations:

  1. User Authentication: Identify the customer, verify login credentials and manage the user’s session securely.
  2. Product Search: Search through a large product catalogue and retrieve relevant products based on the customer’s query.
  3. Product Recommendations: Display relevant products, personalised suggestions and related items.
  4. Seller and Offer Management: Identify available sellers, compare their offers and display applicable prices.
  5. Inventory Availability: Check product availability and whether the selected item can be delivered to the customer’s location.
  6. Pricing and Calculations: Calculate the final payable amount, including applicable taxes, delivery charges, discounts and other charges.
  7. Payment Processing: Coordinate with payment systems to process transactions securely and handle payment confirmation or failure.
  8. Order Management: Create the order, assign an order ID and maintain its current status.
  9. Inventory and Warehouse Operations: Coordinate stock information, warehouse activities and order fulfilment.
  10. Shipping and Delivery: Connect the order with logistics operations and track its movement towards the customer’s address.
  11. Customer Notifications: Send order confirmation, payment updates, shipping information and delivery notifications.
  12. Data Storage and Analysis: Store relevant information for business operations, reporting, customer experience and future recommendations.

Now consider something interesting.

These operations do not necessarily happen inside one program or one server. A large e-commerce platform uses multiple software components and services that communicate with one another. Different components may handle search, payments, inventory, orders, customer information and delivery coordination.

This is where concepts such as Frontend Development, Backend Programming, Databases, APIs, Networking, Cloud Computing, Cybersecurity, Artificial Intelligence, Data Science, Microservices and Distributed Systems become important.

For example, when a customer searches for a laptop, the frontend displays the search interface, backend services process the request, search infrastructure retrieves matching products and databases provide relevant information. The results are then returned to the application and displayed to the customer.

Similarly, when the customer places an order, several services must coordinate to process the purchase and update the relevant order and inventory information.

Understanding these interactions is the foundation of Amazon System Design.

What Will We Explore in This Amazon Technology Case Study?

The purpose of this case study is to go beyond the visible shopping experience and understand the engineering concepts behind a large-scale e-commerce platform.

We will explore how different programming languages are used, how software components communicate, how databases store information, how distributed systems handle large workloads and how cloud infrastructure supports scalable applications.

We will also understand the roles of Artificial Intelligence, Machine Learning and Data Science in improving search, recommendations and customer experience.

Our journey will follow one simple question:

What happens inside a large technology platform from the moment a customer clicks on a product until the order reaches their home?

By understanding this journey, students can connect classroom concepts with real-world software engineering and learn how complex digital platforms are designed and operated.

1.2 What Is Amazon?

Amazon is one of the world’s largest e-commerce and technology companies. It was founded by Jeff Bezos in 1994 and initially started as an online bookstore. Customers could visit its website, browse books and order them online.

Over time, Amazon expanded far beyond books. It developed into a large business and technology ecosystem that connects customers, sellers, financial systems, warehouses, delivery networks and digital services.

Today, Amazon operates across several major business areas:

  1. Online Shopping and Marketplace: Customers can purchase products across categories such as electronics, clothing, books, home appliances and many more. Third-party sellers can also list and sell their products through Amazon’s marketplace.
  2. Digital Content and Subscriptions: Services such as Amazon Prime Video, Amazon Music and Prime membership provide digital content and subscription-based benefits.
  3. Cloud Computing – Amazon Web Services (AWS): AWS provides cloud computing services such as computing power, storage, databases, networking and artificial intelligence tools. Businesses and developers use these services to build and operate applications.
  4. Advertising Services: Amazon provides advertising solutions that allow brands and sellers to promote products and reach potential customers.
  5. Logistics and Fulfilment Operations: Amazon manages and coordinates various operations related to product storage, order processing, packaging, transportation and delivery.
  6. Devices and Technology Products: Amazon also develops technology products such as Kindle e-readers, Fire TV devices and Echo smart speakers.

Amazon Is an Ecosystem, Not Just a Website

Amazon is not simply a website that displays products. It is a technology-driven ecosystem in which multiple participants and software systems work together.

Let’s understand this with a simple example.

Imagine that a customer wants to purchase a laptop worth ₹50,000 from Amazon.

Several participants may be involved in completing this single order:

1. Customer

The customer visits the Amazon website or mobile application, searches for a laptop, compares available products, selects an offer and places an order.

2. Seller

A seller lists the laptop on Amazon’s marketplace. The seller provides product information, pricing and other offer details. Depending on the fulfilment arrangement, the seller may also be responsible for storing or shipping the product.

3. Amazon Platform

Amazon provides the digital marketplace and the technology that connects customers and sellers. Its platform supports product discovery, shopping cart operations, order management and other services.

4. Payment Systems and Financial Institutions

When the customer makes a payment, the payment process may involve payment-processing systems, banks, card networks or other financial institutions, depending on the selected payment method.

These systems help authorize and process the transaction securely.

5. Warehouse or Fulfilment Operations

If the product is handled through an Amazon fulfilment operation, the relevant facility helps manage inventory, locate the product, pick it from storage and prepare it for dispatch.

Not every order follows the same fulfilment arrangement. Some products may be stored and shipped directly by sellers.

6. Delivery Partner

After the order is ready for dispatch, the package moves through the relevant transportation and delivery network. Depending on the delivery arrangement, this may involve Amazon’s own logistics operations or external delivery partners.

Finally, the laptop reaches the customer’s delivery address.

How Do These Participants Work Together?

The important point is that all these participants must coordinate their activities to complete an order successfully.

For example:

From the customer’s perspective, this may look like a single operation. However, from a software engineering perspective, it involves multiple business processes, applications, databases and communication systems.

This is where concepts such as Distributed Systems, Database Management, Backend Development, Cloud Computing, Networking and System Architecture become important.

In the next sections, we will explore these technologies and understand how large-scale e-commerce platforms coordinate complex operations to provide a smooth customer experience.

1.3 Amazon’s E-commerce Business Model

Before understanding Amazon’s technology and system architecture, we should first understand how its e-commerce business works.

Amazon’s shopping platform supports different business models through which products are sold to customers. Two important models are:

  1. First-Party Retail (1P)
  2. Third-Party Marketplace (3P)

Let’s understand how each model works.

1. First-Party Retail (1P)

In the First-Party Retail model, Amazon purchases products from manufacturers, distributors or other suppliers and sells those products directly to customers.

In this model, Amazon acts as the retailer.

For example, imagine that a company manufactures laptops. Amazon purchases 500 laptops from that company and adds them to its retail inventory.

When a customer purchases one of these laptops:

Simple example:

A customer purchases a laptop sold directly by Amazon. The transaction belongs to Amazon’s first-party retail business.

2. Third-Party Marketplace (3P)

In the Third-Party Marketplace model, independent businesses and sellers list their products on Amazon’s marketplace.

Amazon provides the technology platform through which customers can discover products, compare offers and place orders.

In this model, the independent seller is the seller of the product, while Amazon operates the marketplace platform and provides related services.

For example, imagine that three different sellers list the same smartphone model on Amazon:

A customer can compare these offers and choose one based on price, availability, seller information and delivery conditions.

This model allows multiple independent sellers to reach customers through a common marketplace.

Product vs Offer: An Important Technical Concept

To understand Amazon’s e-commerce system design, we need to understand the difference between a Product and an Offer.

These two concepts may look similar, but they represent different types of information.

Product:

A product represents the catalogue item itself.

For example:

The product describes what the item is.

Offer:

An offer represents a seller’s proposal to sell that particular product under specific conditions.

An offer may contain information such as:

The offer describes who is selling the product and under what conditions.

Practical Example: One Product, Multiple Offers

Imagine that a customer searches for a particular smartphone on Amazon.

The catalogue contains one product, but three different sellers provide offers for it.

ProductSellerOffer Price
Samsung SmartphoneSeller A₹25,999
Samsung SmartphoneSeller B₹26,499
Samsung SmartphoneSeller C₹25,799

From a system design perspective, the product and seller offers should be represented separately.

A simplified database relationship could look like this:

Product Table

Product IDProduct Name
P101Samsung Smartphone

Offer Table

Offer IDProduct IDSellerPrice
O101P101Seller A₹25,999
O102P101Seller B₹26,499
O103P101Seller C₹25,799

Notice that all three offers refer to the same Product ID (P101).

This is an example of a One-to-Many Relationship:

This separation helps an e-commerce platform manage product information independently from seller pricing, availability and fulfilment details.

3. How Does Amazon Fulfil Marketplace Orders?

Amazon also supports different fulfilment arrangements for marketplace sellers.

Two important examples are:

A. Fulfilled by Merchant (FBM)

In this arrangement, the seller manages the fulfilment of the order.

Depending on the applicable programme, the seller is responsible for activities such as:

B. Fulfilment by Amazon (FBA)

In the Fulfilment by Amazon programme, the seller sends inventory to Amazon’s fulfilment centres.

Amazon handles specified fulfilment activities under the programme, which generally include:

For example, a seller may send 100 smartphones to an Amazon fulfilment centre.

When a customer places an eligible order, the fulfilment operation can locate the smartphone in inventory, pick it, pack it and prepare it for delivery.

The seller still owns the marketplace inventory until it is sold, subject to the applicable programme terms.

Why Is This Business Model Important for System Design?

Now think about the technical complexity involved.

Amazon’s platform needs to manage several different types of information:

  1. Product catalogue – What products are available?
  2. Seller management – Who is selling each product?
  3. Offer management – What price and conditions does each seller provide?
  4. Inventory management – How many units are available?
  5. Fulfilment management – Who will store, pack and ship the product?
  6. Order management – Which offer did the customer purchase?
  7. Payment processing – How will the transaction be processed?

These responsibilities require well-organized data models and software components.

For example, when a customer opens a product page, the application may need to retrieve product details and display relevant seller offers.

When the customer selects an offer and places an order, the system must associate that order with the selected offer, seller and fulfilment arrangement.

This is why understanding the business model is an important first step before studying the backend architecture, databases, APIs and distributed systems behind a large e-commerce platform.

1.4 A Simple Example: Buying a Laptop on Amazon

Let’s follow one customer journey.

Imagine that Rahul wants to buy a laptop for his college work. His budget is ₹50,000.

He opens Amazon and searches for “Laptop under 50000”.

The application displays several products. Rahul selects one laptop and opens its product page.

He checks:

He decides to buy the laptop and adds it to his cart.

After checking the delivery address and final amount, he places the order.

Now let’s look at the technical activities behind this simple journey.

Amazon laptop buying process showing search, product selection, cart, payment, order confirmation and delivery.
A step-by-step guide showing how a customer buys a laptop on Amazon, from searching for a product to receiving the delivery.

Each step may involve multiple backend services, data stores and external systems.

For example, the search service may retrieve matching products from a search index. The product page may request catalogue information and seller offers. The cart service may store the selected items. During checkout, the system may revalidate price and availability before creating the order.

The important point is that one customer action may trigger communication between several independent software components.

1.5 The Six Conceptual Layers of a Large E-commerce Platform

To understand how a large e-commerce platform works, we can divide its technology architecture into six conceptual layers.

Each layer has a specific responsibility. Together, these layers help an e-commerce platform manage customer interactions, business operations, communication, data, infrastructure and intelligent features.

Amazon technology architecture diagram showing presentation, application, API, data, infrastructure and intelligence layers.

Important: These six layers represent a teaching model for understanding large-scale e-commerce architecture. They are not a confirmed diagram of Amazon’s private internal architecture.

<em>Figure: A conceptual view of the six technology layers that support a large e-commerce platform.</em>

Let’s understand each layer with practical examples and technical concepts.

Layer 1 – Presentation Layer

The Presentation Layer is the part of an application that customers see and interact with.

In an e-commerce platform, it includes the website interface and mobile application interface.

For example, when you open Amazon’s shopping website or mobile application, you can see:

This layer is responsible for presenting information in a clear and user-friendly way.

It also captures customer interactions. For example:

The presentation layer responds to these actions and communicates with the backend to retrieve or update information.

Technologies used in frontend development:

TechnologyPurpose
HTMLDefines the structure of web pages
CSSControls layout, colours and styling
JavaScriptAdds interactive behaviour
TypeScriptAdds static type checking to JavaScript
React / Angular / VueHelps build complex user interfaces

For example, JavaScript can handle a button click, while an API request retrieves the latest product information from the backend.

These are common frontend technologies. We should not assume that every technology used in a sample architecture is necessarily used in Amazon’s current production frontend.

Layer 2 – Application Layer

The Application Layer contains the business logic of the platform.

Business logic refers to the rules and operations that decide how an application should behave.

For example, imagine that a customer adds a laptop to the shopping cart.

The application may need to:

  1. Validate the product identifier.
  2. Check whether the requested quantity is acceptable.
  3. Retrieve the relevant product or offer information.
  4. Calculate the applicable price.
  5. Update the customer’s cart.
  6. Return the updated cart information.

Similarly, when a customer places an order, the application must coordinate several business operations, such as price validation, payment processing, order creation and inventory-related activities.

In a large e-commerce architecture, these responsibilities can be separated into different application services.

Examples of possible service responsibilities include:

ServiceMain responsibility
Customer ServiceManages customer account information
Product Catalogue ServiceManages product information
Seller ServiceManages seller information
Offer ServiceManages seller-specific offers and prices
Search ServiceHelps customers find products
Cart ServiceManages shopping cart items
Order ServiceManages customer orders
Payment ServiceCoordinates payment operations
Inventory ServiceManages stock-related information
Delivery ServiceManages shipment and delivery information
Notification ServiceSends order and account updates

This separation is commonly associated with Service-Oriented Architecture (SOA) and Microservices Architecture.

Instead of putting every business operation into one large application, developers can organize different responsibilities into separate services.

Why is this useful?

Suppose the notification functionality experiences a problem. A well-designed architecture may allow customers to continue browsing products or managing other operations, even if some notifications are delayed.

However, the actual impact depends on service dependencies and system design.

These service names and responsibilities are illustrative examples, not a claim that Amazon currently uses exactly this service structure.

Layer 3 – API and Communication Layer

In a large application, different software components need to communicate with each other.

For example:

The API and Communication Layer provides defined methods through which these software components exchange information.

An API (Application Programming Interface) acts as a communication contract between software components.

Let’s understand this with a simple example.

Suppose a customer opens a laptop product page.

The frontend can send an HTTP request to retrieve product information:

Example API Request:

GET /api/products/P1001

The backend may return a JSON response:

Example API Response:

{
  "productId": "P1001",
  "name": "Business Laptop",
  "price": 45000,
  "currency": "INR",
  "availability": "In Stock"
}

The frontend receives this response and displays the product information on the screen.

This is an illustrative API example, not an actual Amazon endpoint or response.

Common communication technologies:

TechnologyPurpose
HTTP/RESTRequest-response communication between applications
GraphQLAllows clients to request specific data fields
gRPCSupports efficient communication between services
Message QueuesAllow services to exchange messages asynchronously
Event StreamingDistributes continuous streams of events to consumers

There are two important communication approaches.

1. Synchronous Communication

In synchronous communication, one service sends a request and generally waits for a response.

Example:

The frontend requests product details from the backend and waits for the response before displaying the information.

2. Asynchronous Communication

In asynchronous communication, a service can send a message or publish an event without waiting for every receiving service to complete its work.

Example:

After an order is created, an order-related event could be published. Inventory, notification and analytics components can process that event independently.

This approach helps systems handle workloads without requiring every operation to happen at exactly the same time.

We will explore APIs, messaging systems, event-driven architecture and service communication in later modules.

Layer 4 – Data Layer

An e-commerce platform needs to store, organize, retrieve and update a huge amount of information.

Every customer interaction and business operation may involve data.

For example, consider the different information required to complete an online shopping order.

Data TypeExample
Customer DataName, account details and preferences
Product DataProduct title, description and specifications
Seller DataSeller profile and business information
Offer DataSeller, price and selling conditions
Inventory DataAvailable quantity and stock status
Cart DataSelected products and quantities
Order DataOrder number, status and purchased items
Payment DataPayment references and transaction status
Delivery DataShipment events and tracking information
Review DataProduct ratings and customer feedback

Different types of data require different storage and retrieval approaches.

A large platform may use multiple database and storage technologies rather than storing everything in a single database.

Common data storage technologies:

Technology TypeExampleTypical Use
Relational DatabasePostgreSQL, MySQLStructured records and transactional operations
Key-Value StoreRedisFast lookups and caching
Document DatabaseMongoDBFlexible document-oriented data
Search EngineOpenSearch, ElasticsearchFull-text search and filtering
Object StorageAmazon S3Images, documents and other files
Data WarehouseAmazon RedshiftAnalytical queries and reporting

For example, product information may be stored in a database, product images may be stored in object storage, and a search index may help customers find products quickly.

These technologies have different purposes and performance characteristics.

Important database concept:

Consider an order containing three products. The system needs to maintain relationships between the customer, order, purchased items, payment information and fulfilment details.

A suitable data model helps maintain these relationships and supports reliable business operations.

We will study relational databases, NoSQL databases, indexing, caching, transactions, replication and database scaling in a dedicated module.

Layer 5 – Infrastructure Layer

The Infrastructure Layer provides the computing environment in which applications, services and databases operate.

It includes the hardware and software resources required to run a large technology platform.

Consider what happens during a major online shopping sale.

Thousands or even millions of customers may try to access the platform within a short period.

The system needs sufficient computing resources, network capacity and storage to handle incoming requests.

Infrastructure helps manage responsibilities such as:

Common infrastructure technologies and concepts:

Technology / ConceptPurpose
Cloud ComputingProvides computing resources over a network
Virtual MachinesRun applications in virtualized environments
ContainersPackage applications with their dependencies
KubernetesOrchestrates containerized applications
Load BalancersDistribute incoming traffic
Content Delivery Networks (CDNs)Deliver content from geographically distributed locations
Monitoring SystemsTrack application and infrastructure health

Understanding AWS

Amazon Web Services (AWS) is Amazon’s cloud computing business.

AWS provides services for:

For example:

These AWS services help us understand how modern cloud-based applications can be designed and operated.

Important distinction: AWS is a cloud service provider, while Amazon’s retail platform is a separate business operation. AWS documentation explains available cloud technologies, but it should not automatically be treated as proof of the exact infrastructure used internally by Amazon.com.

Layer 6 – Intelligence Layer

Modern e-commerce platforms can use Data Science, Artificial Intelligence and Machine Learning to improve customer experience and business operations.

This is the Intelligence Layer.

Unlike the other layers, which primarily support displaying information, executing business operations, communication, storage and infrastructure, this layer focuses on analysing data and generating predictions, recommendations or intelligent decisions.

Let’s understand this with a practical example.

Suppose a customer regularly searches for laptops, keyboards, computer mice and other computer accessories.

A recommendation system may analyse relevant customer activity and identify products that could be useful to that customer.

When the customer opens a product page, the platform may display related products or accessories.

Common applications of AI, ML and Data Science in e-commerce include:

  1. Product Recommendations: Suggests products based on relevant customer activity and product relationships.
  2. Search Ranking: Helps determine the order in which relevant search results are displayed.
  3. Demand Forecasting: Estimates future demand using historical and other relevant data.
  4. Fraud Detection: Identifies suspicious transaction patterns for further risk assessment.
  5. Personalised Experiences: Helps customize product discovery and other customer experiences.
  6. Inventory Planning: Supports decisions about stock requirements and product availability.
  7. Customer Behaviour Analysis: Helps understand shopping patterns and customer preferences.

How does Machine Learning help?

Machine Learning models can identify patterns from historical data and use those patterns to make predictions or recommendations.

For example, a recommendation model may learn relationships between products that customers frequently purchase together.

If customers often purchase a laptop and a laptop bag together, the system may learn that these products are related and use that information to generate recommendations.

This is a simplified example. Real recommendation systems may use several signals, models and ranking techniques.

We will explore these topics in detail in the Data Science and AI/ML modules.

How Do the Six Layers Work Together?

Now let’s connect all six layers using one practical shopping example.

Imagine that a customer wants to purchase a laptop.

  1. Presentation Layer: The customer opens the website and searches for a laptop.
  2. Application Layer: The application processes the search request and coordinates the relevant business operations.
  3. API and Communication Layer: Different components exchange requests, responses and events.
  4. Data Layer: Product information, offers, inventory and other relevant records are retrieved or updated.
  5. Infrastructure Layer: Computing, networking and storage resources support the application and its services.
  6. Intelligence Layer: Search ranking and recommendation systems may help present relevant products.

These layers are interconnected. A customer action in the presentation layer may trigger operations across several other layers.

The six-layer model gives us a structured way to understand a complex e-commerce platform before studying its individual technologies in depth.

In the next sections, we will move from this conceptual architecture towards the programming languages, databases, distributed systems and cloud technologies that make large-scale applications possible.

1.6 How Do All These Layers Work Together?

In the previous section, we studied the six conceptual layers of a large e-commerce platform separately.

Now, let’s understand how these layers work together during a real shopping activity.

To make it easier to understand, imagine a customer named Rahul who wants to purchase a laptop under ₹50,000 from Amazon.

From Rahul’s perspective, the process looks simple. He opens the website, searches for a laptop, selects a product, adds it to the cart and places an order.

However, several software components and technology layers may work together behind the scenes to complete this activity.

Let’s understand the complete process step by step.

Step 1 – Customer Opens the Application

Rahul opens Amazon using a web browser on his laptop.

The browser loads the website and displays the homepage.

The Presentation Layer is responsible for displaying elements such as:

Frontend technologies such as HTML, CSS and JavaScript help create the interactive website experience.

When Rahul interacts with the website, the frontend handles those actions and communicates with the backend when additional information or processing is required.

Step 2 – Customer Searches for a Laptop

Rahul enters the following search query:

Laptop under ₹50,000

When he submits the search, the frontend sends a request to the backend through an API.

For example, a simplified search request could look like this:

GET /api/search?q=laptop&maxPrice=50000

The request contains the search information required by the backend.

The API and Communication Layer provides the communication mechanism between the frontend and backend.

The backend receives the request and passes it to the appropriate search functionality.

Step 3 – Backend Processes the Request

The backend begins processing Rahul’s search request.

The application may need to:

  1. Read the search keywords.
  2. Identify the maximum price filter.
  3. Validate the request parameters.
  4. Forward the request to the search functionality.
  5. Retrieve matching product results.

For example, the search system needs to identify products related to laptops and apply the maximum price condition.

The Application Layer coordinates the business logic required to process this request.

In a large e-commerce platform, different software components may handle search, product information, pricing and other responsibilities.

Step 4 – Data Is Retrieved

After processing the request, the search functionality needs relevant product information.

The Data Layer provides access to the required information.

For example, the system may retrieve:

Different storage technologies may be involved.

For example:

A large platform does not necessarily retrieve all this information from one database.

Different components may communicate with different data stores depending on their responsibilities.

Step 5 – Search Results Are Ranked

Finding matching products is only one part of the search process.

The system may also need to determine the order in which products should appear.

For example, Rahul searches for laptops under ₹50,000.

The search system may consider different signals, such as:

Machine Learning and Data Science can help improve search ranking and product discovery.

For example, machine learning models may identify patterns in customer behaviour and use them to improve the relevance of search results.

This is where the Intelligence Layer can contribute to the shopping experience.

The exact ranking signals and algorithms used by Amazon are not established by this conceptual example.

Step 6 – Frontend Displays Search Results

After the search operation is completed, the backend returns the relevant results to the frontend.

The response may contain product information in a structured format such as JSON.

For example:

{
  "products": [
    {
      "productId": "P1001",
      "name": "Business Laptop",
      "price": 45000,
      "currency": "INR"
    },
    {
      "productId": "P1002",
      "name": "Performance Laptop",
      "price": 48000,
      "currency": "INR"
    }
  ]
}

This is a simplified example, not an actual Amazon API response.

The frontend processes the response and displays product cards containing information such as:

Rahul can now compare the available laptops and select a suitable product.

Step 7 – Customer Selects a Product

Rahul selects one laptop from the search results.

The frontend sends another request to retrieve the relevant product details.

The application may retrieve:

The Application Layer, API Layer and Data Layer work together to retrieve and present this information.

The product page may also display related products or accessories.

Recommendation functionality may use the Intelligence Layer to identify relevant suggestions.

Step 8 – Customer Adds the Product to the Cart

Rahul likes the laptop and clicks the Add to Cart button.

The frontend sends a cart update request to the backend.

For example:

POST /api/cart/items

A simplified request body could look like this:

{
  "productId": "P1001",
  "quantity": 1
}

The cart functionality processes the request.

It may perform operations such as:

  1. Identify the customer’s cart.
  2. Validate the product and selected offer.
  3. Check whether the requested quantity is acceptable.
  4. Calculate or retrieve the applicable price.
  5. Update the cart information.
  6. Return the updated cart details.

The Application Layer handles the cart-related business logic, while the Data Layer stores or retrieves the relevant cart information.

The frontend then displays the updated cart.

Step 9 – Customer Places the Order

Rahul proceeds to checkout and confirms his order.

This is one of the most important stages because multiple business operations need to be coordinated.

The application may need to:

  1. Validate the selected product offer.
  2. Recheck the applicable price.
  3. Validate delivery information.
  4. Check relevant inventory availability.
  5. Initiate payment processing.
  6. Handle the payment result.
  7. Create the order.
  8. Record the order details.
  9. Initiate the required fulfilment process.

The Application Layer coordinates these operations.

The API and Communication Layer allows different components to exchange information.

The Data Layer stores the relevant order and transaction records.

The Infrastructure Layer provides the computing, networking and storage resources required to run these operations.

Some operations may happen synchronously, while others may be handled asynchronously through messages or events.

For example, after an order is successfully created, an order-related event could be published for other components to process.

Step 10 – Product Is Delivered

After the order is successfully placed, the physical fulfilment and delivery process begins.

Depending on the seller and fulfilment arrangement, the product may be processed through an Amazon fulfilment centre or another applicable fulfilment arrangement.

The process may involve:

The relevant fulfilment and logistics systems coordinate these activities.

The customer may also receive order status updates through the notification functionality.

The Presentation Layer allows Rahul to view order tracking information, while backend services manage the relevant order and shipment updates.

Understanding the Role of All Six Layers

Let’s summarize how the six conceptual layers contribute to Rahul’s shopping journey.

LayerRole in Rahul’s Shopping Activity
Presentation LayerDisplays the website, product pages, cart and order tracking
Application LayerProcesses search, cart, checkout and order-related business logic
API and Communication LayerConnects the frontend and backend and enables service communication
Data LayerStores and retrieves product, seller, cart, order and other information
Infrastructure LayerProvides computing, networking, storage and operational resources
Intelligence LayerSupports search ranking, recommendations and other intelligent features

What Happens Behind One Click?

The most important lesson is that a simple customer action can trigger multiple operations across different technology layers.

For example, when Rahul clicks the Add to Cart button, the browser may send an API request. The backend processes the request, validates the required information, interacts with relevant data stores and returns a response to the frontend.

Similarly, placing an order can involve several interconnected services and business processes.

This is why large e-commerce platforms require carefully designed software architecture, reliable communication mechanisms, scalable databases and robust infrastructure.

A modern e-commerce platform is not just one application. It is a collection of interconnected technologies and services working together to provide a complete customer experience.

In the next section, we will explore the programming languages used in large-scale technology systems and understand why different components may be developed using different languages.

Amazon e-commerce sequence diagram showing customer, frontend, API, search, product, cart and order services.
A sequence diagram showing how different Amazon services communicate when a customer searches for a laptop, adds it to the cart and places an order.

This diagram is a simplified teaching example. A real production system may contain many additional services, validation steps and external integrations.

The key lesson is that the customer sees one application, but many technical components work together behind it.

1.7 Why Does Amazon Need So Many Independent Systems?

After understanding the six conceptual layers and how they work together, you may have an important question:

Why can’t Amazon build one large application that handles everything?

Why should a company create separate systems for search, payments, inventory, orders, recommendations and delivery?

For a small shopping website, a single application may be sufficient. Developers can build the frontend, backend and database operations within one application.

However, when an e-commerce platform grows to support a very large number of customers, products, sellers and orders, managing everything inside one application can become difficult.

A large application may become harder to develop, scale, test, deploy and maintain.

To understand this problem, let’s explore four important reasons why large technology platforms use independent services.

1. Different Features Have Different Requirements

Consider three important e-commerce operations:

Although all three operations are part of the same shopping experience, their technical requirements are very different.

Product Search

A search system needs to find relevant products quickly.

For example, when a customer searches for Laptop under ₹50,000, the system needs to process search keywords, apply filters and return relevant products.

Search functionality may require:

Payment Processing

Payment processing has different requirements.

When a customer makes a payment, the system needs to handle:

Payment operations require careful handling because an incorrect transaction can create financial problems.

Delivery Management

Delivery management involves physical operations and logistics coordination.

It may need to handle:

These operations may involve multiple systems and external partners.

Why separate them?

If all these responsibilities are tightly connected inside one application, changing one feature may affect other parts of the application.

Separating responsibilities into suitable components or services allows each area to be developed and maintained according to its own requirements.

2. Different Services Need Different Scaling Capacity

Imagine that a major shopping sale is running.

A very large number of customers are searching for products, browsing product pages and comparing prices.

However, at any particular moment, only a portion of those customers may be completing payments.

This creates different workloads across different parts of the platform.

Let’s understand with a simplified example.

Suppose a shopping platform receives the following requests during a particular period:

ServiceRequests Per Second
Search Service10,000
Product Service5,000
Cart Service2,000
Payment Service500

<text color=”secondary” size=”xs”>Illustrative numbers for understanding independent scaling. These are not Amazon’s actual traffic figures.</text>

Notice that the search service receives significantly more requests than the payment service in this example.

If the entire application were deployed as one unit, the company might need to increase the computing resources of the whole application even when only the search functionality requires additional capacity.

This can result in unnecessary infrastructure costs.

With independently scalable services, the platform can allocate resources according to individual workloads.

For example:

This approach is called Independent Scaling.

It helps organizations use computing resources more efficiently.

3. Failure Isolation

In a large software system, failures can happen for different reasons.

A service may experience:

The important question is:

If one service fails, should the entire shopping platform stop working?

Ideally, no.

Let’s understand this with an example.

Suppose Rahul opens a laptop product page, but the recommendation service is temporarily unavailable.

The recommendation service normally displays related products such as laptop bags, keyboards and computer mice.

If the system is designed properly, the product page may still display the laptop information and allow Rahul to continue shopping.

Only the recommendation feature may be temporarily unavailable.

This principle is known as Fault Isolation.

Fault isolation attempts to prevent a failure in one component from unnecessarily affecting other components.

Several techniques can help achieve this:

1. Timeouts: Prevent a service from waiting indefinitely for another service.

2. Retries: Allow certain failed operations to be attempted again, with suitable limits and retry policies.

3. Circuit Breakers: Temporarily stop repeated requests to a failing service to reduce further failures.

4. Fallback Mechanisms: Provide an alternative response when a non-essential service is unavailable.

5. Bulkheads: Isolate resources so that excessive workload in one area does not consume all resources needed by other areas.

These techniques are important in designing reliable distributed systems.

However, fault isolation does not happen automatically just because an application is divided into microservices. It requires careful architecture and failure-handling strategies.

4. Independent Development

A large technology organization may have many engineering teams working on different features.

Imagine a simplified team structure:

Engineering TeamResponsibility
Search TeamProduct search and search ranking
Payment TeamPayment processing
Inventory TeamStock and availability management
Order TeamOrder processing
Recommendation TeamProduct recommendations
Delivery TeamShipment and delivery operations

Each team can focus on its assigned business area.

For example:

If the architecture has clearly defined service boundaries and communication interfaces, teams can develop, test and release their components with less dependency on other teams.

This supports faster development and better ownership of individual systems.

However, independent development requires proper coordination.

Teams must carefully manage:

Independent services reduce some forms of development dependency, but they do not eliminate coordination between teams.

The Architecture Behind Independent Systems: Microservices

The architectural approach commonly associated with independently developed and deployed services is called Microservices Architecture.

In this approach, an application is divided into smaller services, with each service responsible for a specific business capability.

For example, a conceptual e-commerce platform may have separate services for:

These services communicate through APIs, messages or events, depending on the requirements.

Each service can be developed, tested, deployed and scaled independently when its architecture and dependencies allow it.

However, Microservices Architecture is not automatically the best choice for every application.

A small application may work more efficiently as a Monolithic Application, where multiple business functions are developed and deployed together.

Microservices introduce additional challenges, including network communication, distributed data management, monitoring, deployment complexity and failure handling.

Therefore, architecture should be selected according to the application’s scale, complexity, team structure and business requirements.

Monolithic Architecture vs Microservices Architecture

Let’s compare the two approaches.

FeatureMonolithic ArchitectureMicroservices Architecture
Application StructureOne integrated applicationMultiple independent services
DeploymentUsually deployed as one unitServices can be deployed separately
ScalingOften scales the application as a wholeServices can scale independently
DevelopmentCan be simpler initiallyRequires service coordination
CommunicationMostly internal function callsAPIs, messages and network communication
MaintenanceCan become difficult as complexity growsResponsibilities can be separated
InfrastructureOften simpler initiallyRequires more operational infrastructure
Best Suited ForSmall and moderately complex applicationsSystems where independent scaling and ownership justify the complexity

Final Understanding

The main reason for creating independent systems is not simply to make an application bigger or more complicated.

It is to manage complexity.

A large e-commerce platform has different business operations, workloads, security requirements and failure conditions.

Separating suitable responsibilities into independent services can help organizations improve scalability, reliability, development speed and system maintainability.

However, these benefits come with additional engineering challenges.

The real objective of good system design is to balance scalability, reliability, performance, maintainability and operational complexity.

In the next section, we will explore the programming languages used in large-scale software systems and understand why different components may use different programming languages.

1.8 What Happens When Something Goes Wrong?

A large e-commerce platform cannot assume that every server, database, network connection or external service will work perfectly all the time.

In a distributed system, different components communicate over networks. Any component or connection may temporarily become unavailable, respond slowly or fail unexpectedly.

For example:

These situations are known as System Failures.

A reliable system is not one that never experiences failures. It is a system that can detect failures, handle them safely and recover without unnecessarily affecting the entire application.

Let’s understand this through four practical scenarios.

Scenario 1 – Search Service Is Not Responding

Imagine Rahul opens Amazon and searches for a laptop.

He enters:

Laptop under ₹50,000

However, the search service is temporarily unavailable because of a server problem or excessive workload.

The website sends a request to the backend, but the search service does not return a response within the expected time.

What should happen?

A well-designed system may follow these steps:

  1. Detect the delay: The application identifies that the search request is taking longer than expected.
  2. Apply a timeout: The system stops waiting after a predefined time limit.
  3. Retry when appropriate: The application may send another request if the failure is temporary and retrying is safe.
  4. Provide a fallback response: If the search service remains unavailable, the website may display a useful error message or an appropriate alternative.
  5. Protect other features: Unrelated functions, such as account access or order tracking, should continue working where possible.

What Is a Timeout?

A timeout is a predefined maximum waiting period for an operation.

For example, suppose the application allows a search request to wait for a maximum of 3 seconds.

If the search service does not respond within those 3 seconds, the request may be stopped or handled through an alternative failure path.

The exact timeout depends on the operation and system requirements.

What Is a Retry?

A retry means attempting an operation again after a failure.

For example, if a temporary network interruption prevents a search request from completing, the application may try again.

However, retries must be controlled.

If thousands of requests repeatedly retry an already overloaded service, they may increase the workload and make the problem worse.

This can create a situation known as a Retry Storm.

Techniques such as exponential backoff and retry limits help control repeated attempts.

Scenario 2 – Database Server Fails

Now imagine that Rahul opens a product page, but the database server responsible for retrieving some required information becomes unavailable.

The application may no longer be able to retrieve the required records from that database node.

A large system can use database replication and recovery mechanisms to improve availability and protect data.

What Is Database Replication?

Database replication means maintaining copies of data across multiple database nodes.

For example, consider a simplified database architecture:

<text weight=”semibold” color=”default”>Primary Database</text>

<box border radius=”lg” padding={3} gap={2}>
<box background=”rgba(46, 125, 50, 0.10)” radius=”md” padding={3} align=”center”>
**Primary Database**
<text size=”xs” color=”secondary”>Handles the main database operations</text>
</box>
<row justify=”center” align=”center”>
<icon name=”arrow-down” color=”secondary” />
<text size=”xs” color=”secondary”>Replication</text>
</row>
<grid columns={2} gap={2}>
<grid-item>
<box background=”rgba(46, 125, 50, 0.08)” radius=”md” padding={2} align=”center”>
**Replica 1**
<text size=”xs” color=”secondary”>Data copy</text>
</box>
</grid-item>
<grid-item>
<box background=”rgba(46, 125, 50, 0.08)” radius=”md” padding={2} align=”center”>
**Replica 2**
<text size=”xs” color=”secondary”>Data copy</text>
</box>
</grid-item>
</grid>
</box>

If the primary database becomes unavailable, the system may promote a suitable replica to become the new primary database.

This process is commonly called Failover.

However, database replication has important technical considerations.

Replication alone does not guarantee that every recent update will always be available immediately.

The result depends on the database architecture, replication strategy, consistency requirements and failure conditions.

We will study database replication, primary-replica architecture, failover and recovery in the database module.

Scenario 3 – Payment Request Times Out

This is one of the most important failure scenarios in an e-commerce platform.

Imagine Rahul selects a laptop and clicks the Pay Now button.

The website sends a payment request to the payment processing system.

However, the network connection is interrupted before Rahul receives the response.

Now Rahul faces a problem.

He does not know whether:

Should Rahul click Pay Now again?

Not immediately.

If the original payment was successful but the response was lost, sending another payment request without proper protection could create a duplicate transaction.

This is why payment systems need special failure-handling mechanisms.

1. Transaction Identifier

A unique transaction identifier helps identify a particular payment attempt.

For example:

TXN10001

The system can use this identifier to track the transaction and its status.

2. Idempotency Key

An idempotency key helps prevent duplicate processing when the same logical request is submitted more than once.

For example, the application generates a unique key for Rahul’s payment operation.

If the same request is retried with the same valid idempotency key, the payment system can recognize that it belongs to an already processed operation rather than creating another independent payment.

The exact implementation depends on the payment provider.

3. Payment Verification

If the browser does not receive a response, the application should not automatically assume that the payment failed.

It may need to check the transaction status with the payment provider using the relevant transaction reference.

4. Payment Reconciliation

Sometimes the application and payment provider may temporarily show different transaction statuses.

Reconciliation helps compare transaction records and resolve such differences.

For example, the payment provider may confirm a successful payment even though the shopping application did not receive the original response.

The application can then update the relevant payment and order records.

Important Concept:

A network timeout does not necessarily mean that the operation failed.

It may mean that the application does not know the final result.

This distinction is extremely important in payment processing.

We will explore transaction identifiers, idempotency, payment verification, reconciliation and failure recovery in the dedicated payment module.

Scenario 4 – Sudden Traffic Increase

Imagine that a major shopping sale begins.

Thousands of customers suddenly start browsing products, searching for offers and placing orders.

The number of incoming requests increases rapidly.

If the application does not have sufficient computing resources, it may experience:

To manage such situations, large-scale systems use several techniques.

1. Load Balancing

A load balancer distributes incoming requests across multiple application servers.

Instead of sending every request to one server, the traffic can be distributed among several available servers.

2. Horizontal Scaling

Horizontal scaling means increasing capacity by adding more servers or application instances.

For example, if an application is running on four instances and demand increases, additional instances can be added.

3. Caching

Caching stores frequently requested information in a faster storage layer.

For example, popular product information may be cached so that repeated requests do not always need to retrieve the same information from the primary database.

4. Request Throttling

Request throttling limits the number of requests that a client or system can send within a defined period.

This helps protect services from excessive traffic.

5. Queue Management

A message queue can hold work that does not need to be completed immediately.

For example, some notification or background-processing tasks can be placed in a queue and processed by workers as capacity becomes available.

6. Traffic Isolation

Different services can have separate resource limits and scaling policies.

This helps prevent excessive traffic in one service from consuming all the resources needed by other services.

These techniques help a platform manage sudden demand and maintain availability.

Summary: How Do Large Systems Handle Failures?

Let’s summarize the major concepts covered in this section.

ProblemPossible SolutionMain Purpose
Service not respondingTimeoutPrevent indefinite waiting
Temporary request failureControlled RetryAttempt the operation again
Repeated failuresCircuit BreakerReduce requests to an unhealthy service
Database server failureReplication and FailoverImprove database availability
Duplicate payment riskIdempotency KeyPrevent duplicate processing
Unknown payment statusPayment VerificationDetermine the actual transaction result
Transaction record mismatchReconciliationResolve differences between records
Sudden traffic increaseLoad Balancing and ScalingDistribute and manage workload
Excessive incoming requestsThrottlingProtect system resources
Background workloadMessage QueuesProcess work asynchronously

Final Understanding

Failures are an unavoidable part of distributed systems.

Servers can stop working, databases can become unavailable, network connections can fail and external services can respond slowly.

The goal of reliable system design is not to assume that failures will never happen.

Instead, developers must design systems that can detect failures, prevent unnecessary damage, recover safely and continue providing essential services wherever possible.

This is the foundation of important distributed systems concepts such as Fault Tolerance, High Availability, Resilience, Replication, Idempotency and Load Balancing.

In the next section, we will explore the programming languages used in large-scale software systems and understand why different components may be developed using different programming languages.

Amazon scalable architecture diagram showing load balancer, application instances, backend services, database, cache and monitoring system.
A visual diagram showing how an e-commerce platform handles customer requests using load balancing, multiple application instances, backend services, databases and monitoring systems.

This is a general architecture example. It illustrates how requests can be distributed across multiple application instances.

1.9 Amazon Dynamo – An Important Example of Distributed Systems

Until now, we have explored how a large e-commerce platform works, why it needs independent services and how it handles system failures.

Now, let’s look at an important example from Amazon’s engineering history that will help us understand the technology behind large-scale distributed systems.

In 2007, Amazon engineers published an influential research paper titled:

“Dynamo: Amazon’s Highly Available Key-value Store.”

This paper was presented at the ACM Symposium on Operating Systems Principles (SOSP) in 2007.

It explains how Amazon approached one of the major challenges of large-scale online applications:

How can a system continue providing access to important data even when individual computers, network connections or other components fail?

The Dynamo paper describes a distributed storage system designed for certain Amazon services that required high availability.

Instead of depending on a single computer or database server, the system used multiple interconnected machines to store and retrieve data.

This research became an important reference in the study of distributed databases and highly available storage systems.

Before exploring how Dynamo works, we first need to understand the basic concept of a Distributed System.

What Is a Distributed System?

Imagine that you are developing a shopping application.

Initially, you use one computer to run the backend application and store all the application data.

For example, this computer stores:

In this arrangement, the application depends heavily on one computer.

What happens if that computer fails?

The application may stop working, and users may lose access to important information until the system recovers.

This creates a major problem when an application needs to serve a very large number of customers.

Now imagine a different architecture.

Instead of storing and processing everything on one computer, we use multiple computers connected through a network.

Each computer can perform specific operations, and the computers communicate with one another to complete application tasks.

For example:

These computers work together as parts of one larger system.

This is the basic idea behind a Distributed System.

Simple Example: One Computer vs Multiple Computers

1. Single-Computer Architecture

<box border radius=”lg” padding={3} gap={2}>
<box background=”rgba(59,130,246,0.10)” radius=”md” padding={3} align=”center”>
**Application Server + Database**
<text color=”secondary” size=”xs”>One computer handles application processing and data storage</text>
</box>
<text color=”secondary” size=”xs” textAlign=”center”>If this computer becomes unavailable, the application may become unavailable.</text>
</box>

2. Distributed Architecture

<box border radius=”lg” padding={3} gap={2}>
<box background=”rgba(59,130,246,0.10)” radius=”md” padding={2} align=”center”>
**Application**
</box>
<row justify=”center”>
<icon name=”arrow-down” color=”secondary”/>
</row>
<grid columns={3} gap={2}>
<grid-item>
<box background=”rgba(46,125,50,0.10)” radius=”md” padding={2} align=”center”>
**Node 1**
<text color=”secondary” size=”xs”>Data / Processing</text>
</box>
</grid-item>
<grid-item>
<box background=”rgba(46,125,50,0.10)” radius=”md” padding={2} align=”center”>
**Node 2**
<text color=”secondary” size=”xs”>Data / Processing</text>
</box>
</grid-item>
<grid-item>
<box background=”rgba(46,125,50,0.10)” radius=”md” padding={2} align=”center”>
**Node 3**
<text color=”secondary” size=”xs”>Data / Processing</text>
</box>
</grid-item>
</grid>
<text color=”secondary” size=”xs” textAlign=”center”>Multiple network-connected computers cooperate to provide the required functionality.</text>
</box>

In a distributed architecture, different computers are called Nodes.

A node can be a physical computer, virtual machine or another computing instance participating in the system.

These nodes communicate through a network and coordinate their activities.

Depending on the architecture, data may be divided across multiple nodes or replicated across them.

Why Do We Need Distributed Systems?

Consider an e-commerce platform that receives a large number of customer requests.

If all requests are handled by one computer, that computer may eventually become a performance bottleneck.

A distributed architecture can help address several challenges:

  1. Scalability: Work can be distributed across multiple computers as demand increases.
  2. Availability: Suitable redundancy and recovery mechanisms can help keep services accessible when some components fail.
  3. Performance: Different nodes can process requests or access data in parallel.
  4. Fault Tolerance: The system can be designed to continue operating despite certain component failures.
  5. Data Distribution: Large datasets can be divided or replicated across multiple nodes.

However, distributed systems also introduce new challenges.

Computers communicate through networks, and networks are not perfectly reliable. Messages may be delayed, connections may fail, and different nodes may temporarily have different views of the data.

Therefore, designing a distributed system requires careful decisions about data consistency, replication, communication and failure recovery.

Connection to Amazon Dynamo

Now we can understand why Amazon’s Dynamo research paper is so important.

Amazon needed highly available storage for certain services operating in a large distributed environment.

The Dynamo paper explored how a distributed key-value storage system could continue serving requests even when individual components experienced failures.

It introduced important design ideas related to:

We will explore these concepts step by step in the next sections.

Important distinction: Amazon Dynamo, described in the 2007 research paper, should not be confused with Amazon DynamoDB. They are related historically, but DynamoDB is a separate managed database service offered by AWS.

Understanding Dynamo will help us move from basic e-commerce architecture to the deeper concepts of distributed storage systems.

Distributed storage system diagram showing application, load balancer, three storage nodes and data partitions.
A diagram showing how an application stores and manages data across multiple nodes using a distributed storage system.

The system can distribute data and responsibilities across multiple nodes.

However, this creates new problems.

The Dynamo paper discusses several techniques for handling these challenges.

Important Concepts from the Dynamo Paper

1. Consistent Hashing

Consistent hashing is a technique used to distribute keys across multiple nodes.

Imagine that a database has millions of records. Instead of sending every request to one server, the system distributes records across multiple nodes.

Consistent hashing helps decide which node should be responsible for a particular key.

It also helps reduce the amount of data that needs to be reassigned when nodes are added or removed.

2. Replication

Replication means maintaining multiple copies of data.

For example, a particular data item may be stored on more than one node.

If one node becomes unavailable, another copy may help the system continue operating.

The number of copies and the consistency behaviour depend on the system’s configuration.

3. Versioning

Suppose two different nodes receive updates to the same data while network communication is interrupted.

The system may need to identify that different versions exist.

Versioning helps identify and manage such situations.

4. Quorum

Quorum is a technique where a configured number of nodes must participate in a read or write operation.

In the simplified Dynamo model, parameters called N, R and W represent the number of replicas, read responses and write acknowledgements involved.

These parameters influence availability and consistency trade-offs.

5. Merkle Trees

Merkle trees are tree structures built from hashes of data.

They can help compare data between nodes and identify differences efficiently.

Instead of comparing every record individually, a system can compare hash values at different levels of the tree.

Merkle tree diagram showing root hash, group hashes and record hashes for data integrity verification.
A visual explanation of how a Merkle tree combines record hashes to create a single root hash and verify data integrity.

These concepts are important for understanding distributed databases and large-scale storage systems.

Important: Dynamo Is Not the Same as DynamoDB

Students often confuse these two names.

They are related historically, but they are not the same thing.

The original Dynamo paper should not be treated as a complete description of DynamoDB’s internal implementation or Amazon’s current retail database architecture. Amazon Science+1

For further study, read the original paper:

Dynamo: Amazon’s Highly Available Key-value Store – Amazon Science.

1.10 How Does Amazon Manage Reliability at Large Scale?

Reliability is the ability of a software system to continue providing its expected services, even when some components fail or unexpected problems occur.

For a large e-commerce platform such as Amazon, reliability is extremely important. Millions of customers may browse products, add items to their carts, make payments and track orders. Even a small technical failure can affect many users.

Imagine a customer trying to place an order during a major sale. The payment service is experiencing a temporary problem, but the customer has already clicked the Place Order button.

What should the system do?

Should it keep waiting? Should it send the payment request again? What if the payment was already successful but the response never reached the application?

These are real engineering challenges in large-scale distributed systems.

Amazon’s public engineering resource, the Amazon Builders’ Library, shares engineering practices and lessons related to building, operating and maintaining reliable software systems. Its articles are written by Amazon engineers and technical leaders.

Let’s understand some important reliability concepts.

1. Timeouts – Never Wait Forever

A timeout defines how long a service should wait for a response from another service.

Consider an application that sends a request to the payment service.

If the payment service does not respond within the configured time, the calling service should stop waiting and handle the situation appropriately.

Example:

A timeout prevents application threads and other resources from remaining occupied indefinitely.

However, a timeout does not always mean that the operation failed. The payment might have succeeded, but the response could have been delayed or lost. This is why payment systems need additional safeguards such as idempotency keys and transaction-status verification.

2. Retries – Try Again When Appropriate

A retry means attempting an operation again after a temporary failure.

For example, a service may fail because of a temporary network interruption. Instead of immediately giving up, the application can retry the request.

Example:

  1. Order Service sends a request to Inventory Service.
  2. The request fails because of a temporary network issue.
  3. The application waits for a short period.
  4. It attempts the request again.
  5. If the request succeeds, processing continues.

But retries must be controlled.

If thousands of services continuously retry failed requests, they can create even more traffic and make the original problem worse. This is sometimes called a retry storm.

Developers must also consider whether an operation is safe to retry. For example, blindly repeating a payment request could cause duplicate charges unless the system uses appropriate idempotency protection.

3. Backoff – Wait Before Retrying

Backoff is a strategy that increases the waiting time between retry attempts.

Instead of sending repeated requests immediately, the application gradually increases the delay.

Illustrative example:

Retry attemptWaiting time
First retry1 second
Second retry2 seconds
Third retry4 seconds
Fourth retry8 seconds

This approach is called exponential backoff.

In production systems, developers often add random variation called jitter. It helps prevent many applications from retrying at exactly the same time.

Backoff reduces unnecessary traffic and gives the failing service some time to recover.

4. Circuit Breaker – Stop Repeatedly Calling a Failing Service

A circuit breaker is a reliability pattern that temporarily blocks requests to a service when repeated failures are detected.

It works similarly to an electrical circuit breaker. When a problem occurs, the circuit opens to prevent further damage.

A typical circuit breaker has three states:

Example:

Imagine that the Recommendation Service is repeatedly failing.

Instead of sending thousands of requests to it, the calling application temporarily stops making those requests. The product page may continue working without recommendations.

When the Recommendation Service recovers, the circuit breaker gradually allows requests again.

This helps prevent a failure in one service from spreading across the entire application.

5. Health Checks – Check Whether Services Are Working

A health check is a mechanism used to determine whether an application instance or service is functioning correctly.

For example, a system may periodically check:

In container-based environments, health checks can help an orchestration platform identify unhealthy application instances and take appropriate action.

However, being alive does not always mean being ready to handle traffic. That is why systems may use separate liveness and readiness checks.

6. Monitoring – Observe the System Continuously

Monitoring helps engineers understand the current health and performance of an application.

For a large shopping platform, engineers may monitor:

For example, suppose the average response time of the Order Service suddenly increases from 200 milliseconds to 3 seconds.

Monitoring systems can help engineers detect this change and investigate the possible cause.

Monitoring is not only about collecting numbers. Teams also define alerts and service-level objectives (SLOs) to understand whether the system is meeting its reliability targets.

7. Logging and Distributed Tracing – Understand What Happened

In a distributed application, one customer request may travel through several independent services.

For example:

Customer → API Gateway → Order Service → Inventory Service → Payment Service → Notification Service

If the order fails, checking only one service’s log may not explain the complete problem.

This is where logging and distributed tracing become useful.

Logging: Records events that happen inside an application. Logs may contain timestamps, error messages, request identifiers and other diagnostic information.

Distributed Tracing: Tracks a request as it travels across multiple services. It helps engineers understand which service processed the request, how much time each step took and where a failure occurred.

A trace ID or correlation ID can help engineers connect related events across different services.

These techniques make debugging complex distributed applications much easier.

How These Reliability Concepts Work Together

Let’s consider an illustrative order-processing scenario.

A customer places an order, but the Inventory Service is temporarily unavailable.

  1. The Order Service sends a request to Inventory Service.
  2. A timeout prevents it from waiting indefinitely.
  3. A controlled retry is attempted.
  4. Exponential backoff increases the waiting time between attempts.
  5. If failures continue, the circuit breaker may temporarily block further requests.
  6. Health checks help identify whether the affected service is ready to handle traffic.
  7. Monitoring alerts engineers about the problem.
  8. Logs and distributed traces help identify the root cause.

The exact recovery process depends on the business operation. For example, an order may be placed into a pending state rather than being immediately cancelled.

The important lesson is that reliable systems do not depend on a single technique. They combine multiple engineering practices to detect failures, limit their impact and recover safely.

Key Reliability Concepts at a Glance

ConceptMain Purpose
TimeoutPrevents waiting indefinitely
RetryAttempts an operation again after a temporary failure
BackoffControls the delay between retries
Circuit BreakerPrevents repeated calls to a failing service
Health ChecksIdentify unhealthy or unready services
MonitoringObserves system health and performance
LoggingRecords application events and errors
Distributed TracingTracks requests across multiple services

These concepts are not just theoretical ideas. They are essential skills for backend developers, software engineers, DevOps engineers and cloud architects who build large-scale software systems.

Official Reading Resource:

Amazon Builders’ Library – Official Engineering Articles

Explore its articles to understand how experienced engineers approach distributed systems, software architecture, deployment, operations and reliability.

1.11 What Should Students Learn to Build a System Like This?

After understanding the overall architecture of a large e-commerce platform, students may have an important question:

“What skills do I need to develop if I want to build an application like Amazon?”

The answer is not a single programming language or technology. Building a large-scale application requires knowledge of frontend development, backend programming, databases, networking, cloud computing, cybersecurity and system design.

You do not need to learn everything at once. The best approach is to build a strong foundation and gradually move towards advanced technologies.

Let’s understand the important skills and why they matter.

1. Frontend Development – Building the User Interface

The frontend is the part of an application that users can see and interact with.

For example, when a customer opens an e-commerce website, the product images, search bar, navigation menu, shopping cart and checkout page are part of the frontend.

Students should learn:

TechnologyWhat You Should LearnWhy It Is Useful
HTMLPage structure, forms and semantic elementsBuild website content
CSSLayout, Flexbox, Grid and responsive designCreate attractive user interfaces
JavaScriptVariables, functions, events and asynchronous programmingMake websites interactive
TypeScriptStatic typing, interfaces and typesMaintain larger frontend applications
ReactComponents, props, state and hooksBuild reusable user interfaces

Practical example: Build a product listing page with product images, prices, search functionality and an Add to Cart button.

2. Backend Development – Building the Application Logic

The backend handles the business logic that works behind the user interface.

For example, when a customer clicks the Add to Cart button, the frontend sends a request to the backend. The backend validates the request, processes the operation and communicates with the database.

Students can start with one backend programming language.

LanguageWhat You Should LearnWhere It Is Useful
PythonFunctions, OOP, APIs and asynchronous programmingBackend development, automation and data science
JavaOOP, collections, multithreading and Spring BootEnterprise and backend applications
JavaScript / TypeScriptNode.js, Express and API developmentBackend services using JavaScript
GoConcurrency, goroutines and networkingCloud and distributed applications
C++Memory management and performanceSystems programming and performance-critical software

You do not need to master all these languages. Start with one language and understand programming fundamentals properly.

Practical example: Create a backend API that receives customer details, validates them and saves a new customer record in a database.

3. Database Management – Storing and Managing Information

An e-commerce application needs to store different types of information, such as customer accounts, product details, prices, orders, payments and inventory.

Students should understand two important database categories.

SQL Databases

Learn relational database concepts, tables, relationships, primary keys, foreign keys, joins, indexes and transactions.

Examples:

NoSQL Databases

Learn document databases, key-value databases, flexible data models and basic concepts of distributed storage.

Examples:

Practical example: Design a database containing Customers, Products, Orders and Order Items tables. Learn how to retrieve a customer’s order history using SQL joins.

4. Data Structures and Algorithms – Writing Efficient Code

A large application processes many operations and large amounts of data. Efficient programming helps reduce unnecessary processing and improve performance.

Students should learn:

Practical example: Imagine a product catalogue containing millions of products. Efficient searching, indexing and filtering techniques help retrieve relevant results without checking every record unnecessarily.

5. Computer Networks – Understanding Communication

Different parts of an application communicate through networks.

For example, a mobile application sends an HTTP request to a backend server. The backend communicates with databases and other services to complete the operation.

Students should learn:

Practical example: When a customer visits an e-commerce website, DNS helps resolve the domain name, a secure connection is established, and the browser communicates with the server using HTTP over TLS.

6. Operating Systems – Understanding How Software Runs

An application does not run independently of the computer’s operating system.

The operating system manages processes, memory, files, threads and other system resources.

Important topics include:

Practical example: If a backend application receives hundreds of requests simultaneously, understanding threads, processes and memory management helps developers investigate performance problems.

7. System Design – Connecting Everything Together

System design teaches students how to combine different technologies and components to build a complete application.

Important topics include:

Practical example: Design an online shopping application that supports product search, user accounts, shopping carts, payments and order tracking.

Students should first understand how a small application works and then learn how to scale it for a larger number of users.

8. Cybersecurity – Protecting Users and Data

An e-commerce application handles sensitive information, including customer details, account credentials and payment-related data.

Security must be considered during application development, not added only at the end.

Students should learn:

Practical example: A customer should only be able to access their own orders. An administrator may have additional permissions to manage products and orders.

9. Cloud Computing – Deploying Applications

A website or application needs computing resources, storage and networking to operate online.

Cloud computing allows developers to use infrastructure and managed services without purchasing and maintaining every physical server themselves.

Students can explore:

Important cloud concepts include:

Practical example: Deploy a backend application on a cloud virtual machine, connect it to a managed database and make it accessible through a domain name.

10. DevOps – Building and Maintaining Software

Developing an application is only one part of software engineering. Developers must also understand how to test, deploy, monitor and maintain it.

Students should learn:

Practical example: When a developer pushes new code to GitHub, a CI/CD pipeline can automatically run tests and deploy the updated application after the required checks pass.

11. Data Science and Machine Learning – Making Applications Intelligent

Modern e-commerce platforms can use data analysis and machine learning to improve customer experiences and business decisions.

Students interested in this field should learn:

Data Science:

Machine Learning:

Practical example: An online shopping application can analyse product views, purchases and customer preferences to recommend relevant products.

Remember that machine learning is not a replacement for the complete application architecture. It is one part of a larger software system.

Complete Skill Summary

The following table provides a quick overview of the technologies and concepts students should explore.

SkillImportant TopicsMain Purpose
HTMLStructure and formsBuild web pages
CSSLayout and responsive designDesign interfaces
JavaScriptProgramming and eventsAdd interactivity
TypeScriptTypes and interfacesMaintainable frontend code
ReactComponents and hooksReusable UI
PythonProgramming and OOPBackend, automation and AI
JavaOOP and Spring BootEnterprise applications
SQLQueries and relationshipsManage structured data
NoSQLDocument and key-value modelsWork with different data models
Data StructuresArrays, trees, maps and graphsOrganise data efficiently
AlgorithmsSearching, sorting and optimisationSolve computational problems
NetworkingHTTP, DNS, TCP/IP and TLSUnderstand communication
Operating SystemsProcesses, memory and threadsUnderstand software execution
System DesignArchitecture and scalabilityDesign large applications
CybersecurityAuthentication and secure codingProtect applications and data
Cloud ComputingAWS, Azure and GCPDeploy applications
DevOpsGit, CI/CD and containersBuild and maintain software
Data ScienceStatistics and data analysisUnderstand business data
Machine LearningTraining and predictionBuild intelligent features

Which Programming Language Should You Learn First?

One important point: different programming languages are designed for different purposes and have different strengths.

You do not need to master Java, Python, C++, Go and Rust simultaneously.

For example:

These are examples of common industry uses, not a statement that Amazon uses each language in a particular internal service.

A Practical Learning Roadmap for Students

Instead of learning everything together, follow a step-by-step approach.

StageWhat to LearnWhat to Build
Stage 1HTML, CSS and JavaScriptPersonal website
Stage 2One programming language and OOPStudent management application
Stage 3SQL and database designStudent database system
Stage 4Backend development and REST APIsStudent registration API
Stage 5React or another frontend frameworkFull-stack web application
Stage 6Authentication and cybersecuritySecure login and role-based dashboard
Stage 7Git, Docker and cloud deploymentDeploy your application online
Stage 8System design and distributed systemsScalable e-commerce application
Stage 9Data Science and Machine LearningProduct recommendation project

Final Advice for Students

Do not try to learn every technology in a few weeks. Focus on understanding the fundamentals and building practical projects.

A good starting combination is:

One programming language + HTML/CSS/JavaScript + SQL + Backend Development + Git.

Once you are comfortable with these foundations, move towards cloud computing, system design, distributed systems and AI/ML.

The goal is not simply to learn the names of technologies. The real goal is to understand how different technologies work together to solve real-world problems.

That is how you gradually develop the skills needed to build complex applications like large e-commerce platforms.

1.12 Practical Student Challenge – Design Your Own Shopping Platform

Now imagine that you are a software engineer working with a college project team.

Your team has received an assignment to design and develop a mini e-commerce application. The goal is to build a platform where customers can explore products, add items to their shopping carts, place orders and track their purchases.

You are not building another Amazon. You are creating a smaller educational version that demonstrates some of the important concepts used in large e-commerce systems.

Project Requirements

Your shopping platform should support the following features:

No.FeatureWhat It Should Do
1User Registration and LoginAllow customers to create accounts and log in securely
2Product ListingDisplay available products with images, names and prices
3Product SearchAllow customers to search for products
4Product DetailsDisplay descriptions, prices and product information
5Seller InformationShow the seller’s name and relevant details
6Shopping CartAllow customers to add, remove and update products
7Order PlacementAllow customers to confirm and place orders
8Payment StatusDisplay whether a payment is pending, successful or failed
9Order TrackingShow the current status of an order

Step 1: Prepare the Basic Architecture

Before writing code, think about how the different parts of your application will communicate.

Your architecture should include:

Start with a simple architecture. You can introduce advanced components such as caching, message queues and load balancers as your project grows.

Step 2: Answer These Engineering Challenges

Now think like a software engineer and answer the following questions.

Challenge 1: Which frontend technologies will you select?

Will you use HTML, CSS and JavaScript, or will you build the interface using React?

Explain why you selected those technologies.

Challenge 2: Which programming language will you use for the backend?

Will you choose Python, Java, JavaScript with Node.js or another language?

Consider your team’s knowledge, project requirements and available libraries.

Challenge 3: Which database will store customer and order information?

Will you use MySQL, PostgreSQL or MongoDB?

Explain how you will store customer accounts, product information, shopping carts and orders.

Challenge 4: How will the frontend communicate with the backend?

Will you use REST APIs over HTTP?

Design example API endpoints such as:

These are illustrative API endpoint designs for your project, not actual Amazon API endpoints.

Challenge 5: What will happen if the payment request fails?

Think about the following situation:

A customer clicks the Place Order button, but the payment gateway does not return a response.

Consider payment status management, transaction IDs, idempotency keys and payment reconciliation.

Challenge 6: How will you prevent two customers from purchasing the last available unit at the same time?

Imagine that only one laptop is available in inventory.

Two customers click Buy at almost the same time.

How will your application ensure that the same unit is not sold to both customers?

Think about:

This challenge introduces an important concept called concurrency control.

Challenge 7: How will your application handle 10,000 users visiting it together?

Imagine that your application becomes popular during a college event or promotional campaign.

Thousands of users visit the website at the same time.

Think about:

You do not need to implement all these technologies in your first version. First understand why they are needed.

Step 3: Build the Project in Phases

Instead of developing every feature together, divide the project into smaller phases.

PhaseDevelopment Work
Phase 1Design the frontend and product listing pages
Phase 2Create the backend and database
Phase 3Develop registration, login and authentication
Phase 4Implement product search and product details
Phase 5Develop shopping cart and order placement
Phase 6Integrate a payment gateway using its test environment
Phase 7Implement inventory management and order tracking
Phase 8Perform security, reliability and performance testing

Your Final Project Goal

At the end of this challenge, your team should be able to demonstrate a working mini e-commerce application and explain its architecture.

You should be able to answer:

These questions will help you think like a software engineer instead of simply writing code.

Remember: The objective is not to build a complete Amazon-sized platform. The objective is to understand the engineering principles behind a real-world application and apply them to a smaller project.

1.13 Part 1 – Important Concepts to Remember

We have explored how a large e-commerce platform works, from the customer interface to backend services, databases, distributed systems and cloud infrastructure.

Before moving to the next part, let’s revise the most important lessons from this chapter.

Key Lessons from Part 1

  1. Amazon is more than an online shopping website. It is a large technology and commerce ecosystem involving customers, sellers, software systems and infrastructure.
  2. Amazon’s marketplace connects customers and sellers. Customers can purchase products offered by Amazon or independent third-party sellers.
  3. Product catalogue information and seller offers are different concepts. A product describes an item, while an offer represents a seller’s proposal to sell that item under specific conditions.
  4. A shopping journey involves multiple technical operations. Searching for a product, checking availability, adding it to a cart, making payment and tracking an order require several connected processes.
  5. The frontend displays information and handles user interactions. Technologies such as HTML, CSS, JavaScript and React help developers build user interfaces.
  6. The backend processes business rules and coordinates application operations. It handles tasks such as authentication, product management, orders and inventory.
  7. APIs allow different software components to communicate. REST, GraphQL and gRPC are examples of technologies and approaches used to build application interfaces.
  8. Databases store and retrieve application data. Relational and NoSQL databases support different types of information and application requirements.
  9. Infrastructure supports application execution, networking and storage. Servers, cloud platforms, load balancers and content delivery networks help applications operate.
  10. AI and machine learning can improve recommendations, search and business decisions. They help applications analyse data and provide intelligent features.
  11. Distributed systems allow applications to work across multiple network-connected machines. Concepts such as replication, partitioning and consistency help manage distributed data and workloads.
  12. Reliability, security and scalability are essential for large applications. Timeouts, retries, monitoring, authentication and fault-tolerance techniques help developers build more dependable systems.

The Big Picture

A large e-commerce application is not simply a collection of web pages. It is a combination of multiple technologies working together.

The frontend interacts with the backend. The backend communicates with databases and other services. Infrastructure provides the resources needed to run the application, while security, reliability and monitoring help protect and maintain it.

Understanding how these components work together is the foundation of software architecture and system design.

In the next part, we will go deeper into the technologies, programming languages, databases and engineering concepts that make large-scale applications possible.

1.14 References and Official Learning Resources

The following resources are useful for students who want to study Amazon’s engineering practices and distributed systems in greater depth.

ResourceWhat you can learn
Amazon Builders’ LibraryArchitecture, reliability and software operations
Amazon Dynamo Research PaperDistributed key-value storage
ACM Dynamo PaperOriginal research publication
Amazon Builders’ Library IntroductionEngineering practices and distributed systems

Continue Your Learning Journey with KHCA

Technology is best learned through practical experience. Along with understanding concepts, students should build projects, experiment with programming languages and develop problem-solving skills.

At Knowledge Hunt Computer Academy (KHCA), you can explore computer education and technology-related learning opportunities.

Visit our website: https://khca.info/

In the next part, we will go deeper into the technologies, programming languages, databases and engineering concepts that make large-scale applications possible.