From a Simple Click to a Global Digital Commerce Ecosystem.

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:
- User Authentication: Identify the customer, verify login credentials and manage the user’s session securely.
- Product Search: Search through a large product catalogue and retrieve relevant products based on the customer’s query.
- Product Recommendations: Display relevant products, personalised suggestions and related items.
- Seller and Offer Management: Identify available sellers, compare their offers and display applicable prices.
- Inventory Availability: Check product availability and whether the selected item can be delivered to the customer’s location.
- Pricing and Calculations: Calculate the final payable amount, including applicable taxes, delivery charges, discounts and other charges.
- Payment Processing: Coordinate with payment systems to process transactions securely and handle payment confirmation or failure.
- Order Management: Create the order, assign an order ID and maintain its current status.
- Inventory and Warehouse Operations: Coordinate stock information, warehouse activities and order fulfilment.
- Shipping and Delivery: Connect the order with logistics operations and track its movement towards the customer’s address.
- Customer Notifications: Send order confirmation, payment updates, shipping information and delivery notifications.
- 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:
- 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.
- Digital Content and Subscriptions: Services such as Amazon Prime Video, Amazon Music and Prime membership provide digital content and subscription-based benefits.
- 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.
- Advertising Services: Amazon provides advertising solutions that allow brands and sellers to promote products and reach potential customers.
- Logistics and Fulfilment Operations: Amazon manages and coordinates various operations related to product storage, order processing, packaging, transportation and delivery.
- 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:
- The customer selects a product.
- The platform identifies the relevant seller and offer.
- The payment system processes the selected payment.
- The order management system records the order.
- The fulfilment operation or seller prepares the product.
- The logistics network transports the package.
- The customer receives order status updates and delivery confirmation.
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:
- First-Party Retail (1P)
- 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:
- Amazon is the seller of the product.
- Amazon manages the retail offer and selling price.
- The product is fulfilled through the applicable fulfilment arrangement.
- Amazon manages the customer-facing retail transaction.
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:
- Seller A offers it for ₹25,999.
- Seller B offers it for ₹26,499.
- Seller C offers it for ₹25,799.
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:
- Brand: Samsung
- Product: Galaxy Smartphone
- Model: Galaxy S-series model
- Storage: 256 GB
- Colour: Black
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:
- Seller ID
- Product ID
- Selling price
- Product condition
- Available quantity
- Fulfilment method
- Delivery-related conditions
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.
| Product | Seller | Offer Price |
|---|---|---|
| Samsung Smartphone | Seller A | ₹25,999 |
| Samsung Smartphone | Seller B | ₹26,499 |
| Samsung Smartphone | Seller 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 ID | Product Name |
|---|---|
| P101 | Samsung Smartphone |
Offer Table
| Offer ID | Product ID | Seller | Price |
|---|---|---|---|
| O101 | P101 | Seller A | ₹25,999 |
| O102 | P101 | Seller B | ₹26,499 |
| O103 | P101 | Seller 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:
- One product can have multiple offers.
- Each offer is associated with a particular product.
- Each offer can contain seller-specific information.
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:
- Storing the product.
- Preparing the order.
- Packing the product.
- Shipping the order.
- Managing applicable customer service and returns responsibilities.
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:
- Storing inventory.
- Picking products after an order is received.
- Packing the products.
- Shipping orders.
- Providing applicable customer service and returns handling.
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:
- Product catalogue – What products are available?
- Seller management – Who is selling each product?
- Offer management – What price and conditions does each seller provide?
- Inventory management – How many units are available?
- Fulfilment management – Who will store, pack and ship the product?
- Order management – Which offer did the customer purchase?
- 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:
- Processor and RAM.
- Storage capacity.
- Display size.
- Product rating.
- Customer reviews.
- Available offers.
- Delivery information.
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.

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.

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:
- Search bar.
- Navigation menu.
- Product categories.
- Product images.
- Product prices.
- Shopping cart.
- Login and account options.
- Order tracking screens.
- Customer reviews and ratings.
This layer is responsible for presenting information in a clear and user-friendly way.
It also captures customer interactions. For example:
- A customer clicks on a product.
- A customer changes the product quantity.
- A customer applies a price filter.
- A customer adds an item to the shopping cart.
- A customer opens the order tracking page.
The presentation layer responds to these actions and communicates with the backend to retrieve or update information.
Technologies used in frontend development:
| Technology | Purpose |
|---|---|
| HTML | Defines the structure of web pages |
| CSS | Controls layout, colours and styling |
| JavaScript | Adds interactive behaviour |
| TypeScript | Adds static type checking to JavaScript |
| React / Angular / Vue | Helps 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:
- Validate the product identifier.
- Check whether the requested quantity is acceptable.
- Retrieve the relevant product or offer information.
- Calculate the applicable price.
- Update the customer’s cart.
- 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:
| Service | Main responsibility |
|---|---|
| Customer Service | Manages customer account information |
| Product Catalogue Service | Manages product information |
| Seller Service | Manages seller information |
| Offer Service | Manages seller-specific offers and prices |
| Search Service | Helps customers find products |
| Cart Service | Manages shopping cart items |
| Order Service | Manages customer orders |
| Payment Service | Coordinates payment operations |
| Inventory Service | Manages stock-related information |
| Delivery Service | Manages shipment and delivery information |
| Notification Service | Sends 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 frontend needs product information from the backend.
- The cart service needs product and offer information.
- The order service needs payment-related information.
- The inventory system needs order-related updates.
- The notification service needs to know when an order status changes.
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:
| Technology | Purpose |
|---|---|
| HTTP/REST | Request-response communication between applications |
| GraphQL | Allows clients to request specific data fields |
| gRPC | Supports efficient communication between services |
| Message Queues | Allow services to exchange messages asynchronously |
| Event Streaming | Distributes 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 Type | Example |
|---|---|
| Customer Data | Name, account details and preferences |
| Product Data | Product title, description and specifications |
| Seller Data | Seller profile and business information |
| Offer Data | Seller, price and selling conditions |
| Inventory Data | Available quantity and stock status |
| Cart Data | Selected products and quantities |
| Order Data | Order number, status and purchased items |
| Payment Data | Payment references and transaction status |
| Delivery Data | Shipment events and tracking information |
| Review Data | Product 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 Type | Example | Typical Use |
|---|---|---|
| Relational Database | PostgreSQL, MySQL | Structured records and transactional operations |
| Key-Value Store | Redis | Fast lookups and caching |
| Document Database | MongoDB | Flexible document-oriented data |
| Search Engine | OpenSearch, Elasticsearch | Full-text search and filtering |
| Object Storage | Amazon S3 | Images, documents and other files |
| Data Warehouse | Amazon Redshift | Analytical 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:
- Application hosting.
- Computing resources.
- Network communication.
- Data storage.
- Load balancing.
- Traffic distribution.
- Backup and recovery.
- Security controls.
- System monitoring.
- Automatic scaling.
- High availability.
Common infrastructure technologies and concepts:
| Technology / Concept | Purpose |
|---|---|
| Cloud Computing | Provides computing resources over a network |
| Virtual Machines | Run applications in virtualized environments |
| Containers | Package applications with their dependencies |
| Kubernetes | Orchestrates containerized applications |
| Load Balancers | Distribute incoming traffic |
| Content Delivery Networks (CDNs) | Deliver content from geographically distributed locations |
| Monitoring Systems | Track application and infrastructure health |
Understanding AWS
Amazon Web Services (AWS) is Amazon’s cloud computing business.
AWS provides services for:
- Computing.
- Databases.
- Storage.
- Networking.
- Security.
- Analytics.
- Artificial Intelligence and Machine Learning.
For example:
- Amazon EC2 provides virtual computing capacity.
- Amazon S3 provides object storage.
- Amazon RDS provides managed relational database services.
- Amazon CloudFront provides content delivery network capabilities.
- Amazon DynamoDB provides a managed NoSQL database.
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:
- Product Recommendations: Suggests products based on relevant customer activity and product relationships.
- Search Ranking: Helps determine the order in which relevant search results are displayed.
- Demand Forecasting: Estimates future demand using historical and other relevant data.
- Fraud Detection: Identifies suspicious transaction patterns for further risk assessment.
- Personalised Experiences: Helps customize product discovery and other customer experiences.
- Inventory Planning: Supports decisions about stock requirements and product availability.
- 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.
- Presentation Layer: The customer opens the website and searches for a laptop.
- Application Layer: The application processes the search request and coordinates the relevant business operations.
- API and Communication Layer: Different components exchange requests, responses and events.
- Data Layer: Product information, offers, inventory and other relevant records are retrieved or updated.
- Infrastructure Layer: Computing, networking and storage resources support the application and its services.
- 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:
- Amazon homepage.
- Search bar.
- Navigation menu.
- Product categories.
- Login and account options.
- Shopping cart.
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:
- Read the search keywords.
- Identify the maximum price filter.
- Validate the request parameters.
- Forward the request to the search functionality.
- 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:
- Product ID.
- Product title.
- Product description.
- Brand and model.
- Product images.
- Technical specifications.
- Seller offers.
- Price information.
- Availability information.
Different storage technologies may be involved.
For example:
- A search index can help identify matching products quickly.
- A database can provide product and seller information.
- Object storage can provide product images.
- A cache can help retrieve frequently requested information faster.
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:
- Relevance to the search query.
- Product specifications.
- Price range.
- Availability.
- Customer preferences.
- Other applicable ranking signals.
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:
- Product image.
- Product name.
- Price.
- Ratings and reviews, where available.
- Available offers.
- Delivery information, where available.
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:
- Product specifications.
- Product description.
- Customer reviews.
- Available seller offers.
- Applicable prices.
- Availability and delivery information.
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:
- Identify the customer’s cart.
- Validate the product and selected offer.
- Check whether the requested quantity is acceptable.
- Calculate or retrieve the applicable price.
- Update the cart information.
- 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:
- Validate the selected product offer.
- Recheck the applicable price.
- Validate delivery information.
- Check relevant inventory availability.
- Initiate payment processing.
- Handle the payment result.
- Create the order.
- Record the order details.
- 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:
- Inventory allocation.
- Product picking.
- Packing.
- Shipment preparation.
- Transportation.
- Delivery tracking.
- Final delivery to Rahul.
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.
| Layer | Role in Rahul’s Shopping Activity |
|---|---|
| Presentation Layer | Displays the website, product pages, cart and order tracking |
| Application Layer | Processes search, cart, checkout and order-related business logic |
| API and Communication Layer | Connects the frontend and backend and enables service communication |
| Data Layer | Stores and retrieves product, seller, cart, order and other information |
| Infrastructure Layer | Provides computing, networking, storage and operational resources |
| Intelligence Layer | Supports 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.

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:
- Product Search
- Payment Processing
- Delivery Management
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:
- Search indexes.
- Fast data retrieval.
- Text processing.
- Relevance ranking.
- Search caching.
Payment Processing
Payment processing has different requirements.
When a customer makes a payment, the system needs to handle:
- Payment authorization.
- Transaction verification.
- Secure communication.
- Duplicate payment prevention.
- Transaction status management.
- Failure handling.
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:
- Shipment creation.
- Warehouse coordination.
- Package tracking.
- Transportation updates.
- Delivery status.
- Delivery confirmation.
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:
| Service | Requests Per Second |
|---|---|
| Search Service | 10,000 |
| Product Service | 5,000 |
| Cart Service | 2,000 |
| Payment Service | 500 |
<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:
- Increase search service instances during a high-traffic sale.
- Keep payment service capacity according to payment demand.
- Scale product services according to product browsing activity.
- Adjust notification service capacity according to notification workloads.
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:
- High CPU or memory usage.
- Network connectivity problems.
- Database failures.
- Software bugs.
- Unexpected traffic spikes.
- External service interruptions.
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 Team | Responsibility |
|---|---|
| Search Team | Product search and search ranking |
| Payment Team | Payment processing |
| Inventory Team | Stock and availability management |
| Order Team | Order processing |
| Recommendation Team | Product recommendations |
| Delivery Team | Shipment and delivery operations |
Each team can focus on its assigned business area.
For example:
- The Search Team can improve search performance.
- The Payment Team can work on transaction reliability.
- The Inventory Team can improve stock management.
- The Delivery Team can develop shipment tracking functionality.
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:
- API contracts.
- Version compatibility.
- Data ownership.
- Service dependencies.
- Security.
- Testing.
- Logging and monitoring.
- Deployment and rollback procedures.
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:
- Customer Management.
- Product Catalogue.
- Search.
- Shopping Cart.
- Payments.
- Orders.
- Inventory.
- Notifications.
- Delivery.
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.
| Feature | Monolithic Architecture | Microservices Architecture |
|---|---|---|
| Application Structure | One integrated application | Multiple independent services |
| Deployment | Usually deployed as one unit | Services can be deployed separately |
| Scaling | Often scales the application as a whole | Services can scale independently |
| Development | Can be simpler initially | Requires service coordination |
| Communication | Mostly internal function calls | APIs, messages and network communication |
| Maintenance | Can become difficult as complexity grows | Responsibilities can be separated |
| Infrastructure | Often simpler initially | Requires more operational infrastructure |
| Best Suited For | Small and moderately complex applications | Systems 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:
- A server may suddenly stop responding.
- A database may become unavailable.
- A network connection may be interrupted.
- An external payment service may respond slowly.
- A sudden increase in traffic may overload an application.
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:
- Detect the delay: The application identifies that the search request is taking longer than expected.
- Apply a timeout: The system stops waiting after a predefined time limit.
- Retry when appropriate: The application may send another request if the failure is temporary and retrying is safe.
- Provide a fallback response: If the search service remains unavailable, the website may display a useful error message or an appropriate alternative.
- 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 may be synchronous or asynchronous.
- Some replicas may receive updates after a delay.
- The system must decide how to handle data consistency.
- Recovery procedures must avoid conflicting database operations.
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:
- The payment was successful.
- The payment failed.
- The payment is still being processed.
- The payment succeeded, but the response was lost.
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:
- Slow response times.
- High CPU and memory usage.
- Database overload.
- Request timeouts.
- Failed transactions.
- Service unavailability.
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.
| Problem | Possible Solution | Main Purpose |
|---|---|---|
| Service not responding | Timeout | Prevent indefinite waiting |
| Temporary request failure | Controlled Retry | Attempt the operation again |
| Repeated failures | Circuit Breaker | Reduce requests to an unhealthy service |
| Database server failure | Replication and Failover | Improve database availability |
| Duplicate payment risk | Idempotency Key | Prevent duplicate processing |
| Unknown payment status | Payment Verification | Determine the actual transaction result |
| Transaction record mismatch | Reconciliation | Resolve differences between records |
| Sudden traffic increase | Load Balancing and Scaling | Distribute and manage workload |
| Excessive incoming requests | Throttling | Protect system resources |
| Background workload | Message Queues | Process 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.

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:
- Customer information.
- Product information.
- Shopping cart data.
- Order information.
- Payment references.
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:
- Computer 1 stores some customer-related data.
- Computer 2 stores another portion of the data.
- Computer 3 stores additional data or a replica of existing data.
- Other computers help process requests and coordinate operations.
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:
- Scalability: Work can be distributed across multiple computers as demand increases.
- Availability: Suitable redundancy and recovery mechanisms can help keep services accessible when some components fail.
- Performance: Different nodes can process requests or access data in parallel.
- Fault Tolerance: The system can be designed to continue operating despite certain component failures.
- 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:
- Data partitioning.
- Data replication.
- Consistency.
- Availability.
- Failure detection.
- Recovery mechanisms.
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.

The system can distribute data and responsibilities across multiple nodes.
However, this creates new problems.
- What happens if one node fails?
- How does the application find the correct data?
- How are multiple copies kept in sync?
- What happens if two copies receive different updates?
- How can the system continue working during network 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.

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.
- Dynamo: The distributed key-value storage system described in Amazon’s 2007 research paper.
- Amazon DynamoDB: A managed NoSQL database service offered by AWS.
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:
- Order Service sends a payment request.
- Payment Service is expected to respond within 3 seconds.
- No response arrives within 3 seconds.
- The Order Service treats the request as timed out and follows its error-handling process.
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:
- Order Service sends a request to Inventory Service.
- The request fails because of a temporary network issue.
- The application waits for a short period.
- It attempts the request again.
- 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 attempt | Waiting time |
|---|---|
| First retry | 1 second |
| Second retry | 2 seconds |
| Third retry | 4 seconds |
| Fourth retry | 8 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:
- Closed: Requests are allowed normally. The system monitors failures.
- Open: Requests are temporarily blocked because the failure threshold has been reached.
- Half-Open: After a waiting period, a limited number of test requests are allowed to check whether the service has recovered.
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:
- Is the application process running?
- Can the application respond to requests?
- Is it able to connect to required dependencies?
- Does it have sufficient resources to continue operating?
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:
- Request success and failure rates.
- Average response time and high-percentile latency.
- CPU and memory usage.
- Database performance.
- Payment failures.
- Queue length and processing delays.
- Availability of important services.
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.
- The Order Service sends a request to Inventory Service.
- A timeout prevents it from waiting indefinitely.
- A controlled retry is attempted.
- Exponential backoff increases the waiting time between attempts.
- If failures continue, the circuit breaker may temporarily block further requests.
- Health checks help identify whether the affected service is ready to handle traffic.
- Monitoring alerts engineers about the problem.
- 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
| Concept | Main Purpose |
|---|---|
| Timeout | Prevents waiting indefinitely |
| Retry | Attempts an operation again after a temporary failure |
| Backoff | Controls the delay between retries |
| Circuit Breaker | Prevents repeated calls to a failing service |
| Health Checks | Identify unhealthy or unready services |
| Monitoring | Observes system health and performance |
| Logging | Records application events and errors |
| Distributed Tracing | Tracks 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:
| Technology | What You Should Learn | Why It Is Useful |
|---|---|---|
| HTML | Page structure, forms and semantic elements | Build website content |
| CSS | Layout, Flexbox, Grid and responsive design | Create attractive user interfaces |
| JavaScript | Variables, functions, events and asynchronous programming | Make websites interactive |
| TypeScript | Static typing, interfaces and types | Maintain larger frontend applications |
| React | Components, props, state and hooks | Build 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.
| Language | What You Should Learn | Where It Is Useful |
|---|---|---|
| Python | Functions, OOP, APIs and asynchronous programming | Backend development, automation and data science |
| Java | OOP, collections, multithreading and Spring Boot | Enterprise and backend applications |
| JavaScript / TypeScript | Node.js, Express and API development | Backend services using JavaScript |
| Go | Concurrency, goroutines and networking | Cloud and distributed applications |
| C++ | Memory management and performance | Systems 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:
- MySQL
- PostgreSQL
- Microsoft SQL Server
NoSQL Databases
Learn document databases, key-value databases, flexible data models and basic concepts of distributed storage.
Examples:
- MongoDB
- Redis
- Amazon DynamoDB
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:
- Arrays and linked lists.
- Stacks and queues.
- Hash tables and maps.
- Trees and graphs.
- Searching and sorting algorithms.
- Recursion and dynamic programming.
- Time and space complexity using Big O notation.
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:
- HTTP and HTTPS.
- DNS and domain resolution.
- TCP/IP.
- TLS and secure communication.
- IP addresses and ports.
- REST APIs.
- Basic networking concepts.
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:
- Processes and threads.
- CPU scheduling.
- Memory management.
- File systems.
- Concurrency and synchronization.
- Deadlocks.
- Basic Linux commands.
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:
- Monolithic and microservices architecture.
- Load balancing.
- Caching.
- Database replication.
- Database partitioning and sharding.
- Message queues.
- API Gateway.
- Horizontal and vertical scaling.
- Fault tolerance and high availability.
- Distributed systems.
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:
- Authentication and authorization.
- Password hashing.
- Role-based access control (RBAC).
- Input validation.
- SQL injection prevention.
- Cross-Site Scripting (XSS).
- Cross-Site Request Forgery (CSRF).
- HTTPS and secure communication.
- Secure API development.
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:
- Amazon Web Services (AWS).
- Microsoft Azure.
- Google Cloud Platform (GCP).
Important cloud concepts include:
- Virtual machines.
- Cloud storage.
- Managed databases.
- Networking.
- Load balancers.
- Auto scaling.
- Content Delivery Networks (CDNs).
- Identity and access management.
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:
- Git and GitHub.
- Linux fundamentals.
- Docker.
- CI/CD pipelines.
- Automated testing.
- Container deployment.
- Application monitoring.
- Basic Kubernetes concepts.
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:
- Python.
- NumPy and Pandas.
- Data cleaning.
- Data visualisation.
- Statistics and probability.
- Exploratory Data Analysis (EDA).
Machine Learning:
- Regression and classification.
- Clustering.
- Model training and evaluation.
- Feature engineering.
- Recommendation systems.
- Prediction and forecasting.
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.
| Skill | Important Topics | Main Purpose |
|---|---|---|
| HTML | Structure and forms | Build web pages |
| CSS | Layout and responsive design | Design interfaces |
| JavaScript | Programming and events | Add interactivity |
| TypeScript | Types and interfaces | Maintainable frontend code |
| React | Components and hooks | Reusable UI |
| Python | Programming and OOP | Backend, automation and AI |
| Java | OOP and Spring Boot | Enterprise applications |
| SQL | Queries and relationships | Manage structured data |
| NoSQL | Document and key-value models | Work with different data models |
| Data Structures | Arrays, trees, maps and graphs | Organise data efficiently |
| Algorithms | Searching, sorting and optimisation | Solve computational problems |
| Networking | HTTP, DNS, TCP/IP and TLS | Understand communication |
| Operating Systems | Processes, memory and threads | Understand software execution |
| System Design | Architecture and scalability | Design large applications |
| Cybersecurity | Authentication and secure coding | Protect applications and data |
| Cloud Computing | AWS, Azure and GCP | Deploy applications |
| DevOps | Git, CI/CD and containers | Build and maintain software |
| Data Science | Statistics and data analysis | Understand business data |
| Machine Learning | Training and prediction | Build 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:
- JavaScript / TypeScript: Useful for frontend development and also backend development with Node.js.
- Python: Useful for backend development, automation, data science and machine learning.
- Java: Useful for enterprise application development and backend systems.
- C and C++: Useful for operating systems, low-level programming and performance-critical software.
- Go: Useful for cloud infrastructure and network-oriented services.
- Rust: Useful for systems programming where memory safety and performance are important.
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.
| Stage | What to Learn | What to Build |
|---|---|---|
| Stage 1 | HTML, CSS and JavaScript | Personal website |
| Stage 2 | One programming language and OOP | Student management application |
| Stage 3 | SQL and database design | Student database system |
| Stage 4 | Backend development and REST APIs | Student registration API |
| Stage 5 | React or another frontend framework | Full-stack web application |
| Stage 6 | Authentication and cybersecurity | Secure login and role-based dashboard |
| Stage 7 | Git, Docker and cloud deployment | Deploy your application online |
| Stage 8 | System design and distributed systems | Scalable e-commerce application |
| Stage 9 | Data Science and Machine Learning | Product 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. | Feature | What It Should Do |
|---|---|---|
| 1 | User Registration and Login | Allow customers to create accounts and log in securely |
| 2 | Product Listing | Display available products with images, names and prices |
| 3 | Product Search | Allow customers to search for products |
| 4 | Product Details | Display descriptions, prices and product information |
| 5 | Seller Information | Show the seller’s name and relevant details |
| 6 | Shopping Cart | Allow customers to add, remove and update products |
| 7 | Order Placement | Allow customers to confirm and place orders |
| 8 | Payment Status | Display whether a payment is pending, successful or failed |
| 9 | Order Tracking | Show 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:
- Frontend: The website or mobile interface used by customers.
- Backend: The application logic that processes customer requests.
- Database: The system that stores customer, product, seller and order information.
- API Layer: The communication interface between the frontend and backend.
- Payment Integration: A payment gateway integration for handling payment requests.
- Hosting Infrastructure: The environment where your application will run.
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:
POST /api/register– Register a customer.POST /api/login– Authenticate a customer.GET /api/products– Retrieve product listings.GET /api/products/{id}– Retrieve product details.POST /api/cart/items– Add an item to the cart.POST /api/orders– Create an order.GET /api/orders/{id}– Retrieve order information.
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.
- Will you immediately mark the payment as failed?
- How will you verify the actual payment status?
- How will you prevent duplicate payments?
- What should happen if the payment succeeds but the application does not receive the 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:
- Database transactions.
- Atomic inventory updates.
- Concurrency control.
- Row-level locking or conditional updates.
- Order reservation and expiry.
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:
- Load balancing.
- Horizontal scaling.
- Caching.
- Database optimisation.
- Connection pooling.
- Rate limiting.
- Monitoring and performance testing.
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.
| Phase | Development Work |
|---|---|
| Phase 1 | Design the frontend and product listing pages |
| Phase 2 | Create the backend and database |
| Phase 3 | Develop registration, login and authentication |
| Phase 4 | Implement product search and product details |
| Phase 5 | Develop shopping cart and order placement |
| Phase 6 | Integrate a payment gateway using its test environment |
| Phase 7 | Implement inventory management and order tracking |
| Phase 8 | Perform 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:
- How does a customer request reach the backend?
- How does the backend retrieve product information?
- How is an order stored in the database?
- How does the application communicate with a payment gateway?
- How does the system handle failures?
- How can the application be improved to support more users?
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
- Amazon is more than an online shopping website. It is a large technology and commerce ecosystem involving customers, sellers, software systems and infrastructure.
- Amazon’s marketplace connects customers and sellers. Customers can purchase products offered by Amazon or independent third-party sellers.
- 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.
- 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.
- The frontend displays information and handles user interactions. Technologies such as HTML, CSS, JavaScript and React help developers build user interfaces.
- The backend processes business rules and coordinates application operations. It handles tasks such as authentication, product management, orders and inventory.
- APIs allow different software components to communicate. REST, GraphQL and gRPC are examples of technologies and approaches used to build application interfaces.
- Databases store and retrieve application data. Relational and NoSQL databases support different types of information and application requirements.
- Infrastructure supports application execution, networking and storage. Servers, cloud platforms, load balancers and content delivery networks help applications operate.
- AI and machine learning can improve recommendations, search and business decisions. They help applications analyse data and provide intelligent features.
- Distributed systems allow applications to work across multiple network-connected machines. Concepts such as replication, partitioning and consistency help manage distributed data and workloads.
- 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.
| Resource | What you can learn |
|---|---|
| Amazon Builders’ Library | Architecture, reliability and software operations |
| Amazon Dynamo Research Paper | Distributed key-value storage |
| ACM Dynamo Paper | Original research publication |
| Amazon Builders’ Library Introduction | Engineering 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.