Instead of one large application where everything is built and deployed together, microservice architecture splits a system into small, independent services, each focused on one job. It underpins many large online platforms, but it is also frequently adopted where it isn’t needed.

In this guide we explain what microservices are, their key characteristics, what a monolith is and how the two compare, how a microservice system works and its main components (services, API gateway, service discovery, load balancer, message queue and event bus, databases, central configuration, logging, container orchestration, CI/CD and service mesh), synchronous vs. asynchronous communication, REST vs. gRPC, data management patterns (database per service, saga, CQRS, event sourcing, eventual consistency), containers and Kubernetes, serverless and SOA, and the pros and cons.

What Is Microservice Architecture?

A software architecture in which a large application is divided into small, independent services, each focused on a specific business capability.

What Does Microservice Mean?

What Does Microservice Mean?

A “micro” service is small and focused. Each one does one job well and communicates with others over a network.

Core Characteristics

  • Focus on a single business capability.
  • Independent deployment.
  • Independent scaling.
  • Each service manages its own data.
  • Technology independence: each service can use a different language or database.
  • Fault isolation: a failure in one service need not take down the rest.

What Is a Monolithic Architecture?

An architecture in which the main components of the application are developed and deployed as one package.

Microservice vs. Monolith

A monolith is deployed as a single unit. In microservices, services can be deployed independently.

Advantages of a monolith: simple to build, test and deploy; easy to debug; low operational overhead. Disadvantages of a monolith: hard to scale parts independently; large codebases slow teams; a small change needs a full redeployment.

How Does Microservice Architecture Work?

Each service exposes an API. Clients (or an API gateway) call the services they need, and services call each other directly or through messages.

Main Components

  • Microservices.
  • API gateway: a single entry point that routes requests.
  • Service discovery: helps services find each other.
  • Load balancer: spreads traffic across instances.
  • Message queue and event bus.
  • Databases.
  • Central configuration.
  • Logging and monitoring.
  • Container orchestration.
  • CI/CD system.
  • Service mesh: manages service-to-service traffic.

Communication Methods

Synchronous Communication

A service calls another and waits for the answer.

  • Advantages: simple, immediate results.
  • Disadvantages: tight coupling; failures can cascade.

Asynchronous Communication

Services exchange messages through a queue or event bus without waiting.

  • Advantages: loose coupling and resilience.
  • Disadvantages: harder to design and debug.
SynchronousAsynchronous
WaitingYesNo
CouplingTighterLooser
Best forImmediate answersEvents and background work

REST API vs. gRPC

REST is simple and widely supported, usually over JSON. gRPC is faster and strongly typed, suited to internal service communication.

Data Management

  • Database per service: the general approach is that each service owns its data. Whether it must be a fully separate physical database depends on project conditions.
  • Shared database: simpler but couples services.
  • Saga pattern: coordinates a multi-service transaction as a sequence of local steps with compensating actions.
  • CQRS: separates reads from writes.
  • Event sourcing: stores changes as a series of events.
  • Eventual consistency: data across services becomes consistent over time, not instantly.

Containers, Kubernetes and Others

  • Container: a lightweight package that bundles an application with its dependencies.
  • Microservice vs. container: not the same. Containers are common but microservices can also run on virtual machines, physical servers or serverless platforms. Docker is a container technology; microservices are an architectural approach.
  • Kubernetes: an orchestration platform that manages containerized applications. It is not itself a microservice.
  • Serverless vs. microservice: serverless runs functions without managing servers; it can be used to build microservices but is a different model.
  • SOA vs. microservices: microservices are finer-grained and favor independence over shared enterprise middleware.

Advantages of Microservices

  • Independent development.
  • Fast deployment.
  • Flexible scaling.
  • Technology flexibility.
  • Fault isolation.
  • Team independence.
  • Managing large applications.

Disadvantages of Microservices

  • Distributed system complexity.
  • Operational cost.
  • Data consistency.
  • Test complexity.
  • Harder error tracing.

Is Microservice Architecture Right for Every Project?

No. In small projects and limited teams it can create unnecessary technical and operational complexity. A well-structured monolith is often the right start.

For infrastructure choices, see what is hosting. For performance, see Google PageSpeed Insights and technical SEO. For building sites and stores, see how to set up an e-commerce website, responsive web design and our web design service.

Frequently Asked Questions

What is microservice architecture?

A software architecture in which a large application is divided into small, independent services focused on specific business capabilities.

What are microservices for?

They allow different parts of an application to be developed, deployed and scaled independently.

What is a monolithic architecture?

An architecture in which the main components of the application are developed in a single application package.

What is the difference between microservices and a monolith?

A monolith is deployed as a single unit. In a microservice structure, services can be deployed independently.

Is microservice architecture suitable for every project?

No. In small projects and limited teams it can create unnecessary technical and operational complexity.

Are containers mandatory for microservices?

No. Containers are common, but microservices can also run on virtual machines, physical servers or serverless platforms.

Are Docker and microservices the same?

No. Docker is a container technology; microservices are an architectural approach.

Is Kubernetes a microservice?

No. Kubernetes is an orchestration platform that manages containerized applications.

Should every service have its own database?

The general approach is that each service is responsible for its own data. Whether the database must be fully separate physically can be evaluated according to project conditions.