The question behind the question

“Should we move to microservices?” is usually really “why is it so hard to change this system?” The honest answer is often not the deployment model at all. It is unclear boundaries, a shared database that every feature touches, a slow release process and too little automated testing. Fix those and the architecture decision becomes much easier – and in many cases much less urgent.

The three options in plain terms

  • Monolith – one codebase, one deployable unit. It is simple to build, test, run and debug. It becomes painful when many teams change it at the same time or when parts of it have very different scaling needs.
  • Modular monolith – still one deployable unit, but with enforced boundaries between internal modules. You get most of the clarity of services with almost none of the operational cost.
  • Microservices – many independently deployed services, each owning its data. Teams can ship independently and scale selectively, at the price of distributed-systems complexity.

What microservices really cost

The benefits of microservices are real, but they are paid for in advance and in full.

  • The network is now part of your code. Every call can be slow, fail or arrive twice. You need timeouts, retries, idempotency and circuit breakers.
  • Data consistency becomes a design problem. Transactions that used to be one database commit become sagas or eventual consistency.
  • Operations multiply. Service discovery, distributed tracing, versioned APIs, contract tests, per-service pipelines and on-call rotations all need to exist.
  • Local development gets harder. Running twenty services on a laptop is rarely pleasant.
  • You need platform skills. Someone has to own the paved road that makes the above manageable.

What a monolith costs when it grows

A monolith is not a mistake; it is a sensible starting point. Problems appear later: builds and test suites slow down, a defect in one area can bring down everything, teams queue behind each other to release, and the codebase turns into a tangle where any change might break something unrelated. These are exactly the symptoms that tempt teams towards microservices – but a modular monolith often removes most of them first.

The modular monolith, in practice

A modular monolith is organised by business capability – billing, catalogue, orders, notifications – not by technical layer. The rules that make it work:

  1. Each module exposes a small public interface and hides everything else.
  2. Modules never read each other’s tables. Each owns its schema; others ask through the interface or via events.
  3. Dependencies are one-way and checked automatically by architecture tests in the build.
  4. Modules communicate through events where possible, which prepares them for later extraction.

With these rules in place, extracting a module into a service later is a bounded project rather than a rewrite.

A decision checklist

  1. Team size. Fewer than around ten engineers? Start with a monolith. Between ten and fifty? A modular monolith is usually right. Beyond that, services start to earn their keep.
  2. Release friction. Are teams blocked by each other’s changes? Introduce modules and a faster pipeline first.
  3. Scaling profile. Does one capability need to scale or fail very differently from the rest – image processing, search, a public API? That capability is a candidate to extract.
  4. Operational maturity. Do you have automated deployment, centralised logging, tracing and a working on-call process? If not, building them is a prerequisite.
  5. Regulatory isolation. Does a component need stricter access control or a separate audit boundary? That can justify a separate service.

Common mistakes

  • The distributed monolith. Services that must be deployed together and share a database give you the costs of both worlds.
  • Splitting too small. Dozens of tiny services owned by one team multiply overhead without adding independence.
  • Splitting by technical layer. A “database service” and a “UI service” mean every feature crosses every boundary.
  • Skipping the platform. Teams are told to “own their services” with no tooling to make that practical.
  • Doing it for the CV. Architecture should be chosen for the product and the organisation, not for fashion.

How to move step by step

  1. Map your business capabilities and the data each one owns.
  2. Refactor towards modules inside the existing codebase; enforce the boundaries with automated checks.
  3. Invest in the delivery pipeline, automated tests, observability and a staging environment that matches production.
  4. Extract the first service only for a concrete reason – independent scaling, independent release cadence or isolation – and measure whether it delivered.
  5. Repeat selectively. Most systems end up as a handful of services around a well-structured core, not hundreds.

Our default recommendation

Build a modular monolith with clear domain modules, separate schemas and one-way dependencies. Extract a module into a service only when a concrete, measurable need appears. You keep the speed and simplicity of a single deployable unit while the boundaries you need for the future quietly accumulate.

Architecture should follow the shape of your teams and your problems, not the other way round.

Key takeaways

  • Painful change is usually a boundaries problem, not a deployment-model problem.
  • A modular monolith captures most of the benefit of microservices at a fraction of the cost.
  • Extract services for measurable reasons, one at a time.
  • Never split without the pipeline, observability and ownership to support it.