Tecnologia 01 Dec 2026 6 min de lectura 24 views

Microservices vs Modular Monolith: When to Migrate

Microservices or modular monolith: realistic criteria for small and mid-sized teams, signs that it is time to split and signs that it is not yet.

Few architecture decisions are made as much out of fashion as this one. Many small teams adopt microservices because "that's what the big companies do" and end up with ten services, three developers and an infrastructure bill nobody expected.

Short answer: A modular monolith is a single deployable application with well-separated internal modules; microservices are independent services that are deployed separately. For most small and mid-sized teams, it is best to start with a modular monolith and split only when there is a concrete problem that separation solves.

What is the difference between a monolith, a modular monolith and microservices?

A monolith is an application that is built and deployed as one unit. If its code is also tangled, it is called a "big ball of mud." A modular monolith is still deployed as one unit, but its code is divided into modules with clear boundaries (billing, inventory, users) that communicate only through defined interfaces. Microservices take those boundaries to the limit: each module is a service with its own deployment, and often its own database.

The key difference is not the size of the code, but where the costs are paid: the modular monolith pays in team discipline; microservices pay in operations, networking and data consistency.

What problems come with splitting into microservices?

When you separate services, problems that used to be a function call become network calls, and networks fail.

  • Data consistency: a transaction that used to be a single database operation now crosses services; you need patterns such as sagas, events and compensations.
  • Observability: one error can travel through five services. Without distributed tracing and centralized logs, debugging is guesswork. We cover this in observability: logs, metrics and traces.
  • Deployment and operations: pipelines, containers, orchestration, and configuration and secrets management per service.
  • Testing: integration tests across services are slower and more fragile.
  • Talent cost: operating a distributed architecture well requires experience that not every team has.

None of this is impossible, but it is a fixed cost paid from the first service, even if the benefit arrives much later.

When does it make sense to migrate to microservices?

Migration makes sense when you can point to a concrete pain that separation solves. Some real signs:

  1. Uneven scaling: one part of the system (for example, report generation or image processing) needs far more resources than the rest, and scaling the whole monolith is expensive.
  2. Teams getting in each other's way: several autonomous teams step on the same code and deployments block each other.
  3. Different release cycles: one module changes daily and another only every quarter because of regulation.
  4. Fault or security isolation: a sensitive component (payments, personal data) requires strict boundaries.
  5. Justified different technologies: a component clearly benefits from another language or engine, for example a machine learning service.

If none of these signs appear, what you probably need is better modularity, not more services.

When is it not yet time to split?

  • Your team has only a few people per domain and shares context easily.
  • You do not have an automated deployment pipeline or basic monitoring.
  • You are still unclear on the domain: the boundaries shift every month. Splitting badly is more expensive than not splitting.
  • The real problem is a slow query or a lack of caching, not the architecture. First review how to optimize backend performance.
  • You want to "scale" without a load figure that justifies it.

How do you build a modular monolith that can be split later?

The great advantage of the modular monolith is that it leaves the door open. A healthy design includes:

  • Modules by business domain, not by technical layer: "orders," "billing," "catalog."
  • Explicit public interfaces between modules; no module reads another's tables directly.
  • Internal events for decoupling, for example "order paid," which one module emits and others listen to.
  • Separate data schemas per module (even if they live in the same database), with a clear owner for each table.
  • Automated rules in the pipeline that prevent forbidden dependencies between modules.

With this in place, the day a module needs to live on its own, you already know its boundaries and its contracts. It is an evolution, not a rewrite.

How do you migrate in stages if you have already decided to split?

Avoid the "big bang." A prudent path:

  1. Identify the candidate module with the greatest benefit and the clearest boundaries.
  2. Isolate it inside the monolith until it communicates only through interfaces.
  3. Extract it as a service behind the same interface and redirect traffic gradually.
  4. Measure: latency, errors and cost before and after.
  5. Repeat only if the result justified the effort.

For communication between services, assess whether you need events and queues; there is a guide in queues and events: asynchronous processing.

Common mistakes

  • Microservices with a shared database: you get all the costs of distribution and none of its advantages.
  • Services that are too small (nanoservices) calling each other in a chain.
  • Migrating without baseline metrics, so nobody knows whether things improved.
  • Underestimating the cost of infrastructure and of on-call (support) coverage during extended hours.
  • Rewriting everything from scratch instead of extracting piece by piece.

In short: how to decide

Situation Suggested recommendation
New product, small team Modular monolith
Specific scaling pain in one module Extract that module
Several autonomous teams blocked Split by domain
Domain still changing Wait and modularize

At DaltoAura we usually build custom systems as modular monoliths and extract services when a measurable need justifies it; this saves the client operating cost without closing the path to scaling.

Frequently asked questions

Are microservices always more scalable than a monolith?

Not necessarily. A well-optimized monolith scales horizontally with several instances behind a load balancer. Microservices let you scale parts separately, which helps when a single function concentrates the load, but they add operational complexity that can outweigh the benefit in small systems.

How many developers do I need to operate microservices?

There is no fixed number, but the practical signal is that each service has a responsible team with deployment and on-call capability. With very small teams, spreading attention across many services usually slows progress more than a well-organized modular monolith would.

Can you go back from microservices to a monolith?

Yes, and several companies have done so when fragmentation cost more than it delivered. It is possible to consolidate services into modules of a single application, as long as you keep the interfaces clear. What matters is to decide based on data about cost, latency and delivery speed.

What is a distributed monolith and why is it considered a mistake?

It is a system split into services that are so tightly coupled that they must be deployed together or break if one changes. It has the complexity of microservices without their independence. It usually happens when a database is shared or when the split is made without clear domain boundaries.

Let's talk

If you have a project in mind or want to review the architecture of an existing system, DaltoAura can help you turn it into a concrete plan, with no commitment.

Tags:

#microservices #modular monolith #architecture #scalability

Share this article

← Previous

AI in Logistics: Route Optimization and Delivery P...

Next →

Payment Gateways in Latin America: A Country-by-Co...

Related Articles