NULLBIT
NULLBIT
Blog
Author: ALFRED

Monolith to Microservices: A Migration Guide for 2026

How to move from a monolith to microservices without a rewrite: when it pays off, how to find boundaries, the strangler fig pattern, data steps and risks.

Monolith to Microservices: A Migration Guide for 2026

Monolith to Microservices: A Migration Guide for 2026

Sketch of software modules becoming services

Move from a monolith to microservices incrementally, one business capability at a time, and only when a specific problem (release bottlenecks, uneven scaling, team collisions) justifies the added operating cost. The safest route is the strangler fig pattern: build the new service beside the monolith, route traffic to it gradually, and retire the old code when nothing depends on it. A big-bang rewrite puts the working business at risk. If the pain is mostly tangled code, a modular monolith may solve it for far less.

This guide is written for business and technical leaders who own a growing product and need to decide whether to migrate, how to sequence it, and what can go wrong.

Nullbit
Plan a More Scalable Architecture
Nullbit develops custom software tailored to business needs, helping organizations address operational inefficiency and scalability as they modernize.
Visit

TL;DR

  • Migrate for a named business problem, not for fashion. Microservices trade code complexity for operational complexity.
  • Draw boundaries around business capabilities, not database tables, and make each service own its data.
  • Use the strangler fig pattern: proxy in front, extract one capability, redirect traffic, keep the monolith as a rollback path.
  • Start with a loosely coupled capability, and build deployment and monitoring tooling alongside the first one or two services.
  • If your boundaries are still unclear, tighten them inside a modular monolith first.

Table of Contents

Should you migrate at all?

Microservices are not an upgrade level. They are a different set of trade-offs. You gain independent deployment and scaling per service. You pay with network calls, distributed data, more monitoring and a heavier operations load.

Sam Newman, who wrote the standard book on the topic, has said in an InfoQ interview that the modular monolith is a highly underrated option, and that he has told about half of his clients over three years that microservices are not for them. His reasoning: organizations struggle to define module boundaries and even more to keep them intact over time.

A useful way to decide is to ask which problem you are actually solving:

Symptom Likely cause Better first move
Releases are slow because every change needs full regression testing Tight coupling, weak test automation Modular monolith plus a better pipeline
One feature (search, checkout, reports) needs ten times the capacity of the rest Uneven load Extract that one capability
Several teams block each other in the same code Team structure matches no code structure Extract along team-owned capabilities
The stack is end of life and blocks hiring Technology debt Incremental replacement, service by service
Code is “messy” but the product is small Missing design discipline Refactor in place

If your first two or three rows match, migration is likely to pay off. If only the last two do, start smaller.

Modular monolith or microservices?

A modular monolith is one deployable application with strict internal modules, each exposing a defined interface and owning its own data. It gives you most of the design benefits of microservices without network hops, and it is the cheapest way to find out whether your boundaries are right. A module that has stayed clean for a year can later become a service with little rewriting. AWS describes this exact case in its decompose by subdomain pattern: when a monolith already has well-defined modules, they can be repackaged as microservices without significant rewriting.

Choose microservices when you need independent scaling or independent release cycles across teams and you have the engineering capacity to run distributed systems. Choose the modular monolith when one team owns most of the code and the main need is order.

Finding the right service boundaries

Bad boundaries are the most common reason migrations disappoint. Services cut too coarse stay a monolith in disguise. Services cut too fine drown you in coordination and data consistency problems.

Microsoft’s Azure Architecture Center recommends starting from a bounded context: a part of the business with its own vocabulary and rules, such as billing or inventory. Then look at the aggregates and domain services inside it as service candidates, weigh nonfunctional needs such as load and latency, and validate each candidate against four checks:

  1. It has a single responsibility.
  2. It does not need chatty calls to its neighbors.
  3. It can be deployed independently.
  4. Its boundary does not create data-consistency headaches.

A peer-reviewed case study of a mission-critical forex system from TU Wien reached a similar conclusion: migration should be driven by the business, working outside in. A business function that is isolated and big enough, or shared by many other functions, becomes a service. Each step moves the team further from the legacy system and reduces the risk of ending up with a distributed monolith.

Boundaries to avoid

Do not split by technical layer (a “database service,” a “UI service”) or by database table. Zhamak Dehghani warns on martinfowler.com that cutting along normalized data views produces a swarm of thin create-read-update-delete services that cannot be released independently. Her advice on size is practical: start with larger services around a logical domain concept and split further only when your teams can release, monitor and operate more services.

The quick test: if changing one business rule forces you to change and release three services together, the boundary is wrong.

The strangler fig pattern, step by step

The strangler fig pattern is named after a vine that grows around a tree until it replaces it. In software, you build the new system around the old one, feature by feature, until the monolith can be switched off. It is the most searched migration approach for a reason: the business keeps running the whole time.

AWS defines three phases:

  1. Transform. Port or rewrite a component as a new service, in parallel with the live system.
  2. Coexist. Put an HTTP proxy in front so outside calls are intercepted, redirect traffic to the new service gradually, and keep the monolith available for rollback.
  3. Eliminate. Retire the old functionality as traffic moves away from it.

Newman describes the same idea as two keys: capture which functionality you are migrating, then divert calls to the new service only where that functionality has actually moved.

When it fits and when it does not

AWS notes that the pattern needs access to the code base, because you build an anti-corruption layer (a translation layer that stops the monolith’s old data model from leaking into the new service) and proxy routing. It also says large monoliths benefit most, while small applications may be more efficient to rewrite outright.

A practical migration sequence

Microsoft’s app modernization guidance gives a five-step skeleton: assess components and dependencies, define bounded contexts, rearchitect incrementally without interrupting service, containerize each service, and deploy to an orchestrated cluster. Here is how that plays out in practice.

1. Write down the goal and the metric

Pick two or three measurable outcomes: deployment frequency, lead time for a change, peak-hour error rate, infrastructure cost for the hot path. Without them you cannot tell in month six whether the migration is working.

2. Map dependencies

Inventory modules, who calls whom, and which tables each module touches. The tables matter most. A capability that reads and writes five other modules’ tables is a poor first candidate.

3. Pick a first service that teaches you something

Choose a capability that is fairly decoupled and visible enough to matter. Dehghani suggests examples such as end-user authentication or customer profile, and building your CI/CD pipeline and API management alongside the first one or two services, so that tooling is not an afterthought. If authentication is your first extraction, centralizing it also pays off elsewhere; see our SSO implementation guide.

4. Put the routing layer in place

Insert a proxy or API gateway in front of the monolith before extracting anything. It lets you shift traffic by percentage, compare behavior, and roll back in minutes. As your service count grows, versioning and governance of those interfaces becomes its own discipline, covered in our guide to API lifecycle management.

5. Extract, then move the data

This is the step teams underestimate. A common, safe order is to extract the code first, let it keep using the monolith’s database, and split the data only once cross-domain constraints are cut. Glovo’s engineering team did exactly this when it pulled its Subscriptions domain into a separate module inside the monolith repository and deliberately deferred the data migration.

Wise planned a fuller sequence for extracting its Transfer capability: migrate writes, then reads, copy tables, move historical data in small batches, reconcile the two sources and delete the old tables. In its write-up, the team reports that it initially completed only the first two steps, a useful reminder to plan data work as its own multi-stage project rather than a line item.

The sequencing logic is the same in any domain. A booking system migration guide for golf clubs shows how data migration order and database coupling decide whether a live system can change without disrupting the people using it every day.

When you do separate data, the rule is simple: one service owns each dataset, and other services get it through that service’s interface or through events. For systems where history matters, event sourcing can make data migrations between services far less painful.

5. Extract, then move the data

6. Shift traffic gradually and watch

Route 1% of traffic, then 10%, then 50%, then all, with logging, monitoring and tracing in place before the first percentage moves. Keep the monolith path alive until the new service has run a full business cycle (a month-end close, a seasonal peak).

Traffic rollout from one percent to all

7. Delete the old code

This step is the one that gets skipped. If the monolith keeps the dead code, you carry both systems’ costs. Remove the old module, its tables and its tests once rollback is no longer needed.

Risks and how to avoid the distributed monolith

A distributed monolith is the worst outcome: all the operational cost of microservices with none of the independence. The signs are services that must be deployed together, services that read each other’s databases, and long synchronous call chains where one slow service stalls the rest.

To stay clear of it:

  • Give each service its own data. Shared tables are shared coupling.
  • Prefer coarse over fine to start. You can split a service later; merging a hundred is painful.
  • Limit synchronous calls. Where a user does not need an immediate answer, use asynchronous messaging.
  • Invest in observability early. A request that crosses six services is impossible to debug without distributed tracing and central logs.
  • Automate deployment first. Manual releases multiplied by 20 services stops a team.
  • Plan the team shape. Each service needs a clear owning team, on call for it.

Capacity planning also changes. Services scale independently, but only if you load-test them that way; our guide to web app scalability covers how to build and test for growth. If you serve many customers from the same platform, the multi-tenant architecture choices you make now will shape your data boundaries later.

What it costs and how long it takes

There is no honest universal number. Cost depends on the size of the monolith, the depth of coupling in its data, your test coverage and how many capabilities you extract. What you can control is how you buy the uncertainty down. A short proof of concept on one capability gives you a working service, a routing layer and a measured result before you commit to a program. Our proof-of-concept work starts from €5,000 as a one-off project, and our legacy modernization approach is built around proving one application at a time.

For the larger program, there are two ways to engage. An agile time-and-materials engagement runs from €5,000 to €40,000 per month and suits migrations where scope evolves as you learn. A fixed-price turnkey project runs from €5,000 to €60,000 one-off and suits a well-defined extraction. Details are on our cooperation page.

Where we can help

Migration is an engineering project and a business-continuity project at once. We build custom software, handle system engineering, and design cloud infrastructure for the environments your services will run in. Our approach is technology-agnostic and aimed at stable, scalable systems with measurable business results and long-term partnership, so the architecture follows your goals, not a fixed stack.

A sensible first step is to start with a proof of concept on one capability, from €5,000, and use the result to size the rest. See our custom software development services or go straight to the engagement options.

Nullbit

Our perspective

Most migrations that struggle did not fail on technology. They failed because nobody decided what the migration was for. We start by naming one business result, such as faster releases for a specific team or capacity for a specific peak, and we measure against it.

We prefer small, provable steps over a grand redesign. One capability, one routing layer, one measured outcome. That is why we like proof-of-concept work as an entry point: you see a real service running next to your real system before you commit budget to the rest.

We also treat the modular monolith as a legitimate destination, not a consolation prize. Where your boundaries are still moving, tightening them first makes every later extraction cheaper. Where they are clear, we build the service, the delivery pipeline and the cloud setup together, so the first service is also the template for the second.

The goal is a system your team can run calmly, not the largest number of services.

Matija

FAQ

What is the strangler fig pattern?

It is a migration approach where you build new services around an existing application and move functionality over piece by piece. A proxy routes each request either to the old code or to the new service, and the old code is retired once traffic has fully moved. The monolith stays available for rollback throughout.

How do I break a monolith into microservices without downtime?

Place a routing layer in front of the monolith, extract one capability at a time, and shift traffic in small percentages while monitoring errors and latency. Keep the old path live until the new service has handled a full business cycle. Move data last and in stages, with reconciliation between the old and new sources.

Is a modular monolith better than microservices?

It depends on your problem. A modular monolith suits teams with one main codebase and unclear boundaries, because it enforces structure without distributed-systems overhead. Microservices suit cases that need independent scaling or independent release cycles across several teams.

When should I use microservices?

Use them when specific parts of your system need to scale or release independently, several teams are blocking each other, and you have the tooling and operating capacity to run many services. Without those conditions, extra services mostly add cost.

Which service should I extract first?

Choose a fairly decoupled capability with a clear business owner, such as authentication or customer profile. Avoid anything that shares many tables with other modules. Use it to build your deployment pipeline and monitoring.

Sources

Tags
monolith to microservices
Stay ahead of the competition

Exclusive insights that drive change.

Get access to proven methodologies for digital growth, AI tool implementation, and AI product development.

  • Weekly digital strategy analyses
  • Advanced insights into AI trends and technology solutions

Your privacy is a priority. You can unsubscribe at any time.