Backend & DevOps

Microservices vs Modular Monolith: How to Choose

How to pick an architecture that fits your teams today and can still split later.

3 min read

Engineer drawing a diagram on a whiteboard
Photo: Jeswin Thomas on Unsplash

In short

  • A modular monolith is one deployable application split into well-separated modules. Microservices split the system into independently deployed services that talk over the network.
  • Microservices pay off when many teams must release independently or parts of the system scale very differently. Otherwise they add cost and complexity.
  • For most new products, a modular monolith with clear boundaries is the faster start, and it leaves the door open to extract services later.

Microservices vs modular monolith is one of the most expensive architecture decisions a product team makes, because it shapes how teams work, how releases happen and what the cloud bill looks like for years. The industry spent a decade moving toward microservices; recently, more teams have moved back toward well-structured monoliths. This guide explains both options and gives practical criteria for choosing.

Definitions in plain terms

  • Monolith: one application, one deployment. Often fine, but without discipline it turns into a “big ball of mud” where everything depends on everything.
  • Modular monolith: still one deployment, but the code is divided into modules (for example payments, accounts, notifications) with explicit interfaces and no hidden dependencies between them.
  • Microservices: each module becomes its own service with its own data, deployed and scaled independently, communicating via APIs or events.

A well-known example

In 2023, Amazon Prime Video’s engineering team described moving its stream-monitoring service from a distributed, serverless design to a single application, which sparked wide debate in the cloud community (The New Stack). The team reported much lower infrastructure cost, because passing video data between distributed components and orchestrating many state transitions was expensive. Some analysts pointed out that the result is not a classic monolith and that the case covers one subsystem only (TechTarget). The lesson is not “monoliths are better” but “network boundaries have a cost; put them only where they earn it”.

Microservices vs modular monolith, compared

Modular monolithMicroservices
DeploymentOne unitMany independent units
Team independenceShared release trainTeams release on their own schedule
ScalingScale the whole appScale each service separately
DataOne database, separated schemas per moduleDatabase per service
Failure modesIn-process calls, simple transactionsNetwork failures, retries, eventual consistency
Operational costLowerHigher: service discovery, tracing, many pipelines
Best whenOne to a few teams, evolving domainMany teams, stable domain boundaries, very uneven load

How to choose

  1. Count teams, not features. Microservices solve an organisational problem: many teams blocking each other. One or two teams rarely have it.
  2. Check domain stability. If you do not yet know where the boundaries are, a monolith lets you move them cheaply. Wrong service boundaries are expensive to fix.
  3. Look at load profiles. If one part (for example image processing or AI inference) needs very different scaling, extract that part only.
  4. Be honest about operations. Microservices need mature CI/CD, observability, on-call and platform skills. See Kubernetes for product teams.
  5. Consider data. If most features need transactions across many entities, splitting the data will hurt.

How to build a modular monolith that can split later

  • One module per business capability, each with a public interface and private internals.
  • Enforce boundaries automatically with architecture tests (for example ArchUnit for Java and Kotlin, or Spring Modulith).
  • Separate data ownership: each module owns its tables; others access them only through the module’s API.
  • Communicate with events internally where coupling is loose, so the move to a message broker later is small. See event-driven architecture with Kafka.
  • Measure build times, test times and deployment frequency; extract a service when a module clearly needs its own lifecycle.

From our work

On one mobile banking programme, our work was followed by 5x fewer incidents and failed transactions (case study). We build the backends, CI/CD and cloud infrastructure behind fintech and mobile products, and the Linux and ROS 2 software behind robots.

Technologies you will meet

AreaTypical tools
Modular monolithSpring Boot with Spring Modulith, Kotlin or Java, ArchUnit, .NET with modular projects, Node.js with Nx workspaces
MicroservicesSpring Boot, Go, Node.js, gRPC, REST, GraphQL federation
MessagingApache Kafka, RabbitMQ, outbox pattern with Debezium
RuntimeDocker, Kubernetes, API gateways, service mesh
ObservabilityOpenTelemetry, Jaeger, Prometheus, Grafana
DataPostgreSQL with schema per module, Redis, database per service

If you are modernising an existing system rather than starting fresh, read legacy software modernisation: rewrite, refactor or replace? For mobile products, how to design a backend for mobile apps applies the same thinking.

Frequently asked questions

What is a modular monolith?

One deployable application divided into well-separated modules with explicit interfaces and owned data.

When are microservices worth it?

When many teams must release independently, or when parts of the system need very different scaling.

Did Amazon Prime Video move away from microservices?

Its stream-monitoring service moved from a distributed serverless design to a single application in 2023, mainly to cut cost.

Can a modular monolith become microservices later?

Yes, if modules have clear boundaries and owned data, extracting a service later is much easier.

Working on something like this?

Tell us where the product is stuck. We answer with a concrete next step.

Send a few lines about the product, the deadline and the team you have today. A senior engineer replies within two working days.