Skip to main content

Real architecture · Mid

Amazon: from monolith to SOA

Real production architecture. Key points: Microservices vs. Monolith and Domain-Driven Design.

15 min read · Source: Amazon · Content reviewed on October 23, 2026

Short answer

Real production architecture. Key points: Microservices vs. Monolith and Domain-Driven Design. This case is read from a summary published on High Scalability, built from an interview with Amazon's CTO. It is a third-party summary, not the primary text of the interview.

01 · CONTEXT

One site, one application, shared databases

This case is read from a summary published on High Scalability, built from an interview with Amazon's CTO. It is a third-party summary, not the primary text of the interview.

The architecture change the text describes is the move from a two-tier monolith to a decentralized, distributed service platform that serves several applications. At first there was one application talking to a back end.

  1. At first there was one application talking to a back end; the diagram shows the browser, the front-end application, and the databases.

    Architecture diagram: Amazon: two-tier monolith
    CLNavegador
    CPFront-end application
    CPOther teams' processes
    DBShared databases
  2. For years the scaling effort was making the back-end databases grow to hold more items, customers, and orders and to serve several international sites.

    Architecture diagram: Amazon: two-tier monolith
    CLNavegador
    CPFront-end application
    CPOther teams' processes
    DBShared databasesdatabases growing
  3. The databases became a shared resource, which made it hard to scale the business as a whole.

    Architecture diagram: Amazon: two-tier monolith
    CLNavegador
    CPFront-end application
    CPOther teams' processes
    DBShared databasesshared resource
  4. Front end and back end evolved under constraints because they were shared by many teams and processes.

    Architecture diagram: Amazon: two-tier monolith
    CLNavegador
    CPFront-end applicationstalled evolution
    CPOther teams' processes
    DBShared databases
  5. In 2001 it became clear that the front-end application no longer scaled.

    Architecture diagram: Amazon: two-tier monolith
    CLNavegador
    CPFront-end applicationno longer scales
    CPOther teams' processes
    DBShared databases

The text points to two pain points: the databases as a shared resource, and evolution held back by a front end and back end shared by many teams and processes.

02 · THE SHIFT TO SERVICES

Data behind service interfaces

The answer was to split the databases into small parts and create, around each part, a service interface that became the only access path to the data.

In today's terms, it is the idea behind microservices with domain boundaries that are well defined, although the text talks about service-oriented architecture.

  1. The databases were split into small parts, and each part got a service interface that is the only access path to the data.

    Architecture diagram: Amazon: service platform
    CLNavegador
    CLExternal developer
    CPPage application server
    CPWeb services interface server
    CPService A
    CPService B
    CPService C
    DBService A dataonly via service
    DBService B dataonly via service
    DBService C dataonly via service
  2. The architecture grew to hundreds of services and application servers that aggregate their information; the diagram shows only a few.

    Architecture diagram: Amazon: service platform
    CLNavegador
    CLExternal developer
    CPPage application server
    CPWeb services interface server
    CPService A
    CPService B
    CPService C
    DBService A data
    DBService B data
    DBService C data
  3. The application that renders the Amazon.com pages is one of these application servers, and the web services interface is another.

    Architecture diagram: Amazon: service platform
    CLNavegador
    CLExternal developer
    CPPage application server
    CPWeb services interface server
    CPService A
    CPService B
    CPService C
    DBService A data
    DBService B data
    DBService C data
  4. To build a page, between 100 and 150 services are accessed; only three appear here.

    Architecture diagram: Amazon: service platform
    CLNavegador
    CLExternal developer
    CPPage application server
    CPWeb services interface server
    CPService A
    CPService B
    CPService C
    DBService A data
    DBService B data
    DBService C data
  5. Clients do not access the database directly: this way the service can scale and become more reliable without involving whoever consumes it.

    Architecture diagram: Amazon: service platform
    CLNavegador
    CLExternal developer
    CPPage application server
    CPWeb services interface server
    CPService A
    CPService B
    CPService C
    DBService A data
    DBService B data
    DBService C data
  6. Web services are offered externally in SOAP and REST, with 30% using SOAP and 70% using REST; the diagram shows the web services interface.

    Architecture diagram: Amazon: service platform
    CLNavegador
    CLExternal developer
    CPPage application server
    CPWeb services interface server
    CPService A
    CPService B
    CPService C
    DBService A data
    DBService B data
    DBService C data
AspectoTwo-tier monolithService platform
Data accessDatabases shared across teams and processesService interface is the only path to the data
EvolutionHeld back because front end and back end were sharedIsolation to build components quickly and independently
AggregationOne application talking to a back endApplication servers aggregate information from the services

A design detail: a single mechanism for accessing services makes it easier to aggregate, route requests in a decentralized way, and trace across the distributed system.

03 · TEAMS AND OPERATIONS

A service is also a team unit

Services are the independent units that deliver functionality and also the way the company organizes its teams. A team is limited to 8-10 people, the so-called two-pizza teams, and is given the authority to solve the problem as a service in whatever way it sees fit.

Another lesson from the text is that whoever builds also operates (you build it, you run it), which brings daily contact with the customer. Internally, SLAs are used to manage services.

An interview question that follows from this: should a service's boundary coincide with the boundary of what a small team can own end to end, data included?

04 · STATE AND CAP

Availability in the cart, consistency in the order

The summary treats state management as the central problem in large-scale systems, but notes that few operations are stateful; the checkout steps are.

By CAP theorem, a shared-data system has at most two of three properties. To scale you must partition, which leaves choosing between strong consistency or high availability for a specific system.

  1. In the cart, the request to add an item is always accepted, because that generates revenue; errors are hidden from the customer and resolved later.

    Architecture diagram: Amazon: cart versus order
    CLClient
    CPCart servicedisponibilidade
    CPOrder service
    CPCredit card
    CPShipping and handling
    CPReporting
    DBOrder data
  2. When the order is submitted, consistency is favored, because credit card, shipping and handling, and reporting access the data at the same time.

    Architecture diagram: Amazon: cart versus order
    CLClient
    CPCart service
    CPOrder serviceconsistency
    CPCredit card
    CPShipping and handling
    CPReporting
    DBOrder dataconcurrent access
  3. The choice of approach depends on the needs of each service.

    Architecture diagram: Amazon: cart versus order
    CLClient
    CPCart servicedisponibilidade
    CPOrder serviceconsistency
    CPCredit card
    CPShipping and handling
    CPReporting
    DBOrder data

05 · LESSONS AND CAUTIONS

What to take away and what not to generalize

Among the lessons of the text: keep things as simple as possible, with no hidden requirements and dependencies, and note that many third-party technologies are hard to scale to Amazon's size.

Frequently asked questions

What is Amazon: from monolith to SOA?

Real production architecture. Key points: Microservices vs. Monolith and Domain-Driven Design.

What does the Amazon: from monolith to SOA design cover?

It is organized in these sections: One site, one application, shared databases, Data behind service interfaces, A service is also a team unit, Availability in the cart, consistency in the order, and What to take away and what not to generalize.

How long is Amazon: from monolith to SOA and what level is it?

It takes about 15 minutes to read and is rated Mid level.

Now design it yourself

Run this case as an interview in the System Design school: you make the decisions, the tutor challenges them and you see how your design scores.