Skip to content
Engineering

Microservices

Definition

Microservices is an architectural style that structures an application as a collection of small, independent services. Each service is designed to perform a specific task and can be developed, tested, and deployed independently.

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