Architecturemicroservicesservice-oriented architecture

Microservice

Definition

A microservice is a separately built, deployed and scaled service responsible for a bounded business capability, owning its own data store and exposing it only through an API or events.

In practice

Microservices let teams ship independently, scale hot parts of a system separately and choose technology per service. The benefits are organisational as much as technical and appear mostly when many teams work on one product.

Every in-process call becomes a network call that can be slow or fail, transactions across services need sagas or outboxes, and debugging needs distributed tracing. Splitting too early or along the wrong boundaries gives a distributed monolith: all of the cost and none of the independence.

Example

An e-commerce system splits into catalog, orders, payments and shipping services, each with its own database, coordinating through an OrderPlaced event.