Skip to content
Engineering

Monolith

Definition

A monolith is an application built and deployed as a single unit, with all its features in one codebase. It is simpler to start with, but harder to scale and change piece by piece than a microservices architecture.

Diagram

A monolith beside microservicesOn the left, catalog, cart, payments and accounts live in one application with one database, deployed together. On the right, each is its own service with its own database, deployed separately, talking to the others over the network through an API gateway.MonolithCatalogCartPaymentsAccountsone databaseone codebase, one deploysimple to build and change earlyevery change ships everythingMicroservicesAPI gatewayCatalogits own DBCartits own DBPaymentsits own DBAccountsits own DBeach deployed and scaled on its ownteams ship independentlynetwork calls, harder to debug
Microservices solve a people problem as much as a technical one: many teams stepping on each other in one codebase. A small team usually moves faster with a well-organized monolith, and splits out services only where it clearly needs to.

Case study

Worked example