Monolith to microservices migration is the process of breaking a large, single-piece application into smaller, independently deployable services that communicate over a network. A monolith to microservices migration is usually done gradually, moving one capability at a time while the original system keeps running. The short answer is that the safest migrations are incremental: they replace the monolith piece by piece, prove each piece in production, and only retire the old system when nothing is left to move.
Migration matters because a monolith that once served a team well can become a bottleneck as it grows. Every change touches the same codebase, every release carries the risk of the whole system, and scaling one busy feature means scaling everything.
Microservices solve these problems by letting teams change, deploy and scale parts independently, but they also add real complexity: distributed systems fail in new ways, and a migration done badly can leave a team with the worst of both worlds. Our guide to microservices architecture explains the target design this migration aims for.
Key takeaways
- Monolith to microservices migration means splitting one large application into small, independently deployable services.
- The strangler fig pattern is the safest route: grow new services around the monolith and retire it gradually.
- Service boundaries should follow business capabilities, not technical layers.
- Data migration is usually harder than code migration, and it decides the schedule.
- Do not start until the monolith’s pain — slow releases, scaling limits or fragility — is real and measurable.
What a monolith is, and when it stops working
A monolith is an application built and deployed as a single unit, with its user interface, business logic and data access all in one codebase. For many systems this is the right design: it is simple to develop, simple to test, simple to deploy, and simple to debug, because everything runs in one process. Small teams with one product often do their best work with a monolith, and there is nothing old-fashioned about choosing one.
Problems appear as the system and the team grow. Releases slow down because every change, however small, must pass through the same build, test and deployment pipeline.
One team’s bug can bring down the whole application, and scaling a single busy feature means running more copies of everything, which wastes resources. When several teams must coordinate every release, or when one feature’s load dominates the whole system’s cost, the monolith has become a constraint rather than a convenience. Best for: teams deciding whether their monolith is a problem to solve or a design to keep.
What microservices actually change
Microservices split an application into small services, each owning one business capability, each with its own data store, and each deployable on its own. A payments service, a search service and a user profile service can each be built by a different team, released on a different schedule, and scaled independently. A failure in one service can be contained instead of taking the whole system down, provided the services are designed to degrade gracefully.
What changes with this split is not just the code but the operating model. Each service needs its own deployment pipeline, its own monitoring, its own data backup and its own owner. Communication between services becomes a network concern, with latency, retries and partial failures to handle.
The trade is clear: microservices buy independence and scalability, and they charge for it in operational complexity. Teams that cannot afford that complexity should not migrate. Best for: architects weighing whether the benefits of services outweigh their running costs.

The strangler fig pattern
The strangler fig pattern, named by Martin Fowler after a tree that grows around a host and gradually replaces it, is the standard approach to incremental migration. A facade, usually an API gateway or a reverse proxy, sits in front of the monolith and routes each request either to the old system or to a new service. New functionality is built as services from the start, and existing functionality is extracted one capability at a time, with traffic redirected as each service proves itself.
The pattern works because it never asks for a big-bang cutover. The business keeps running on a working system throughout, each extracted service delivers value on its own, and any service that misbehaves can have its traffic routed back to the monolith.
The migration follows three phases described in the AWS Prescriptive Guidance for the pattern: transform, coexist and eliminate. Transform creates the new service, coexist runs old and new side by side, and eliminate retires the old code once traffic has fully moved. Best for: teams that need to modernize a system the business depends on every day.
Finding the right service boundaries
Service boundaries decide whether the migration succeeds or produces a distributed monolith, which is the worst outcome: all the complexity of services with none of the independence. The reliable guide is domain-driven design, which groups code by business capability rather than by technical layer. A service should own one coherent capability, such as billing or inventory, and the data that capability needs, so that most of its work happens inside the service rather than through calls to others.
Good boundaries are visible in how the business talks about the system. If the business describes orders, payments and shipping as separate concerns with their own rules and their own owners, those are natural service boundaries. Boundaries drawn around technical layers, such as a database service or a validation service, are almost always wrong, because every business change then touches many services.
Start with the boundaries that are clearest and least coupled, and let the harder ones emerge as the team learns. Our guide to cloud native computing explains how services fit into the wider architecture. Best for: architects drawing the first service boundaries for a migration.
Data: the hardest part of the migration
Splitting code is straightforward compared with splitting data. A monolith usually has one shared database, and every part of the system reads and writes the same tables. Microservices need each service to own its data, which means deciding which tables belong to which service, untangling shared tables, and handling the transactions that used to span the whole database in a single step.
The practical approach is to split the database gradually, in step with the services. Start by giving the new service its own tables and synchronising them from the monolith, then move the writes, then remove the old tables once nothing reads them.
For data that must stay consistent across services, use events rather than shared tables: a service publishes what changed, and other services react. Distributed transactions across services should be avoided wherever possible, because they reintroduce the coupling the migration was meant to remove. Best for: teams planning the data work, which usually takes longer than the code work.
| Approach | Risk | Speed | Best suited to |
|---|---|---|---|
| Strangler fig | Low | Gradual | Large systems that must keep running |
| Big-bang rewrite | Very high | Slow, then sudden | Tiny systems with few users |
| Branch by abstraction | Medium | Gradual | Replacing internals without changing the interface |
| Extract one service first | Low | Fast to learn | Proving the approach before committing |
| Parallel run | Medium | Slow | Systems where correctness must be proven |
The table shows why the strangler fig dominates real migrations: it is the only approach that keeps risk low while the system stays in production. A big-bang rewrite looks faster on a plan, but it delivers nothing until the cutover, and the cutover is the moment of maximum risk. Starting with a single extracted service is a useful first step even inside a strangler fig migration, because it proves the deployment pipeline, the monitoring and the data approach before the team commits to the whole programme. Best for: decision makers comparing migration approaches before approving one.
Common mistakes that derail migrations
The most common mistake is splitting too finely, too early. A system carved into dozens of tiny services before the team understands the boundaries becomes a debugging nightmare, where a single user request crosses ten network hops and a failure anywhere breaks everything. Start with a handful of coarse services and split them further only when a service clearly contains two capabilities with different rates of change.
The second mistake is migrating without fixing the platform first. Microservices need automated deployment, centralised logging, distributed tracing and service discovery, and a team that migrates before these exist will spend its time fighting the platform instead of the migration. The third mistake is keeping the shared database while splitting the code, which produces a distributed monolith: services that cannot be deployed independently because they all depend on the same tables. Best for: teams reviewing a migration plan and looking for the traps that catch most programmes.
Migration checklist
- Confirm the monolith’s pain is real: slow releases, scaling waste or fragility, measured not assumed.
- Put the platform in place first: automated deployment, logging, tracing and monitoring.
- Draw service boundaries around business capabilities, not technical layers.
- Start with one low-risk service at the edge of the system to prove the approach.
- Use a facade to route traffic, so each service can be rolled back independently.
- Split the data in step with the code, using events instead of shared tables.
- Give every service a named owner, its own pipeline and its own runbook.
- Retire monolith code as traffic moves, and keep the old system running until nothing is left.
Frequently asked questions
How long does a monolith to microservices migration take?
It depends on the size of the monolith and how many services it becomes. A small system can migrate in months, while a large one worked through service by service can take several years. The strangler fig approach means the business gets value throughout, rather than waiting for a single cutover.
Should every monolith be migrated to microservices?
No. A monolith that serves one team, deploys easily and scales well enough is a good design, and migrating it adds cost without benefit.
Migrate when releases are slow, one feature’s load dominates costs, or teams cannot work independently. Our guide to service meshes covers the networking layer services often need.
What is the strangler fig pattern?
It is an incremental migration pattern named by Martin Fowler, in which a facade routes requests between the old monolith and new services. New services grow around the monolith, traffic moves to them one capability at a time, and the monolith shrinks until it can be retired. It avoids the risk of replacing the whole system at once.
How do microservices handle data consistency?
Each service owns its own data, and services share information through events rather than a shared database. This means giving up the single database transaction that a monolith relies on, and designing for eventual consistency: data in different services agrees after a short delay rather than instantly. Systems that need instant consistency across many records are poor candidates for splitting.
What is a distributed monolith?
A distributed monolith is a system split into services that still depend on each other so tightly that they cannot be deployed or scaled independently. It usually happens when services share a database or call each other for every operation. It carries the complexity of microservices with none of the independence, and it is the outcome to avoid.
Do microservices need Kubernetes?
No, although Kubernetes is the most common platform for running them. Microservices can run on virtual machines, on managed container services, or on serverless platforms.
What they do need is automated deployment, service discovery, logging and monitoring, whatever the platform underneath. Our guide to container orchestration explains how platforms manage services at scale.







