Skip to content

Microservice architecture

Also called: microservices, microservice, microservices architecture

Published:

How does it differ from a monolith?

James Lewis and Martin Fowler's 2014 article describes the style as an approach to developing a single application as a suite of small services [1]. Each service runs in its own process, communicates through lightweight mechanisms, often an HTTP resource API, and is built around a business capability [1].

A monolith, by contrast, is built as a single unit. A change to any part means rebuilding and redeploying the whole application, and scaling applies to all of it rather than just the parts that need more resources [1].

How do services handle data and communication?

Microsoft's architecture guide notes that each service is managed as a separate codebase and can be deployed on its own, so teams can update one without redeploying the entire application [2]. There is no central data layer; each service owns its data and schema [2]. Services talk through well-defined APIs that keep their internals hidden, and they need not share a language, library or framework [2].

What does it cost?

Each service is simpler, but the system as a whole is more complex [2]. Here is a concrete case: if service A calls B, which calls C, the latency added along that chain can become a real problem [2]. With data spread across services, keeping it consistent is harder, so the guide recommends embracing eventual consistency where possible and warns that success requires a mature DevOps culture [2].

Frequently asked questions

Should every project be split into microservices?

No. The style buys independent deployment and scaling, but it makes the system more complex and needs a mature DevOps culture. Teams should judge whether they can carry that load first.

What is the opposite of a microservice architecture?

Usually a monolith: an application built and deployed as a single unit.

Sources

  1. Microservices — James Lewis and Martin Fowler, martinfowler.com
  2. Microservices Architecture Style — Microsoft Learn

Related terms