Microservices architecture

Microservices architecture is a software design approach that structures an application as a collection of small, independent services, each owning a single business capability and communicating over the network through APIs. Every service can be developed, deployed, scaled, and updated on its own, without redeploying the whole system.

How microservices work

In a microservices architecture, a single application is decomposed into multiple services that each handle one well-defined responsibility, such as authentication, billing, or notifications. Services are loosely coupled and communicate through lightweight protocols, typically REST or gRPC over HTTP, or asynchronously through a message broker.

Each service usually owns its own data store, which avoids a shared database becoming a single point of contention. Services are independently deployable, so a team can release a change to one service without coordinating a release across the entire application.

  • Single responsibility: one service maps to one business capability.
  • Independent deployment: services ship on their own schedule and version.
  • Decentralised data: each service manages its own database and schema.
  • Communication over the network: synchronous APIs or asynchronous messaging/events.
  • Fault isolation: a failure in one service should not cascade to the whole system.

This independence is the core trade-off: it buys flexibility and scalability at the cost of operational and distributed-system complexity.

Microservices vs monolith

A monolith packages the entire application as a single deployable unit, while microservices split it into many independently deployable services. Neither is universally better; the right choice depends on team size, scaling needs, and operational maturity.

CriterionMonolithMicroservices
DeploymentOne unit, deployed as a wholeEach service deployed independently
ScalingScale the entire applicationScale only the services under load
DataTypically one shared databaseOne database per service
CodebaseSingle, tightly coupledMultiple, loosely coupled
Team organisationTeams coordinate on one releaseTeams own services autonomously
Failure impactA fault can bring down the appFaults can be isolated per service
Operational complexityLower; one runtime to operateHigher; networking, monitoring, orchestration
Best suited toSmall teams, early-stage productsLarge teams, high-scale, independent domains

Many teams start with a monolith and extract microservices later, only when scaling pressure or organisational growth justifies the added complexity.

Benefits and drawbacks

Microservices solve real problems for large, fast-moving organisations, but they introduce costs that smaller teams often underestimate.

Benefits:

  • Independent scaling: allocate resources to the services that actually need them.
  • Technology freedom: each service can use the language or database best suited to its job.
  • Team autonomy: small teams own a service end to end, reducing release bottlenecks.
  • Resilience: well-designed services contain failures rather than propagating them.

Drawbacks:

  • Distributed complexity: network calls fail, add latency, and require retries and timeouts.
  • Data consistency: transactions spanning services are harder, often requiring eventual consistency.
  • Operational overhead: you need service discovery, monitoring, logging, and orchestration (commonly containers and Kubernetes).
  • Testing and debugging: tracing a request across many services is harder than in a single process.

Microservices are an organisational and operational commitment as much as a technical one. They pay off when domain boundaries are clear and the team can support the tooling required.

Questions fréquentes

Microservices make sense when an application is large enough that multiple teams need to deploy independently, when specific parts must scale differently from the rest, and when business domains have clear boundaries. For early-stage products or small teams, a well-structured monolith is usually faster to build and operate. Many teams migrate to microservices only once scaling or coordination becomes a bottleneck.

Services communicate over the network rather than through in-process calls. Synchronous communication typically uses REST or gRPC over HTTP, where one service calls another and waits for a response. Asynchronous communication uses a message broker or event stream, letting services publish and consume events without waiting, which improves decoupling and resilience.

An API is the interface a service exposes so other systems can interact with it. Microservices is an architectural style for how an entire application is structured into independent services. Each microservice usually exposes its own API, so APIs are how microservices communicate, but you can have APIs without adopting a microservices architecture.

No, microservices are an architectural pattern and do not strictly require containers. In practice, however, containers and orchestration platforms such as Kubernetes are widely used because they simplify deploying, scaling, and managing many independent services. Smaller microservices deployments can run on virtual machines or managed serverless platforms instead.

Building a custom software project? We design bespoke software aligned with your roadmap.

See our custom software expertise