From Monolith to Microservices: A Pragmatic Guide to Legacy Modernization
Arshad Ali · November 14, 2026
Most established software companies have a monolith they would like to escape. The codebase is slow to change, releases are scary, and one team's bug takes down everyone else's feature. The tempting answer is a rewrite: freeze the old system, build the new one "properly", and switch over. In our experience that is the single most expensive way to modernize, and the one most likely to fail.
This guide covers the approach we actually use: incremental modernization, where the old system keeps running and earning money while new pieces replace it one at a time.
First, Make Sure the Monolith Is the Problem
Microservices solve specific problems. Before you commit to them, check which symptoms you have:
- Deployment coupling: teams wait on each other to release, and every release ships everything.
- Scaling mismatch: one part of the system needs ten times the capacity of the rest, and you pay to scale all of it.
- Blast radius: a failure in a minor feature brings down critical paths like checkout or login.
- Technology lock: a part of the system needs a runtime, library or data store the monolith can't accommodate.
If your real problems are missing tests, unclear ownership or a tangled data model, splitting into services will give you the same problems over a network, with added latency and partial failures. In that case, start with a modular monolith: enforce module boundaries inside the existing codebase, give each module its own data access layer, and stop modules reaching into each other's tables. It is often the step that makes later extraction cheap, and sometimes it is all you need.
The Strangler Fig Pattern
The strangler fig is a vine that grows around a host tree until it can stand on its own. Applied to software, it means building new functionality around the old system and gradually routing traffic away from it, until the old part can be switched off.
- Put a facade in front. An API gateway, reverse proxy or routing layer that all traffic passes through. On day one it forwards everything to the monolith, and nothing changes for users.
- Pick a seam. Choose a capability with clear inputs and outputs and few dependencies: notifications, document generation, pricing, reporting. Avoid starting with the core domain everything depends on.
- Build the replacement beside the old code. The new service owns its own data and exposes a clean API.
- Route a slice of traffic. Send a small percentage, a single tenant or internal users to the new service through the facade. Compare results against the monolith where you can.
- Cut over and delete. Once the new path is proven, move all traffic and remove the old code. Skipping the deletion step is how you end up maintaining two systems forever.
Each step is small, reversible and delivers value on its own. If priorities change halfway through, you still have a working system with less legacy in it than before.
Data Is the Hard Part
Extracting code is usually straightforward. Extracting data is where modernization projects stall. A monolith's database is typically shared by everything, with reports, batch jobs and integrations all reading the same tables. A few techniques help:
- Change data capture (CDC): stream changes from the monolith's database into the new service's store, so the new service can serve reads before it owns writes.
- The outbox pattern: when the monolith changes data, it also writes an event to an outbox table in the same transaction. A relay publishes those events reliably, so other services never miss an update.
- Move ownership of writes last. Read paths are low risk to migrate. Write ownership should move only after the new service has proven it serves the data correctly.
- Find the hidden consumers. Before moving a table, list every report, export and integration that reads it. There are always more than anyone remembers.
What This Looks Like in Practice
We have used this approach on systems where downtime was not an option. One example was the integration engine of a large long-term-care software platform, which exchanges medical records with hundreds of external vendors in many formats. Rewriting it in one go would have meant months of frozen integrations. Instead, the engine was redesigned behind stable interfaces, one integration type at a time, while records kept flowing.
The lesson from that kind of work is consistent: the target architecture matters less than the migration plan. A good plan has a working system at every step, a clear way to roll back, and an agreed definition of when each old piece gets deleted.
Don't Forget the Organization
Services work best when they map to teams. If three teams have to coordinate to change one service, you have moved the coupling, not removed it. Before splitting, decide who will own each service, its on-call and its data. Invest early in shared foundations, such as CI/CD pipelines, logging and tracing, and service templates, so every new service starts production-ready.
A Short Checklist Before You Start
- Can you name the specific problems microservices will solve for you?
- Do you have automated tests around the area you're extracting first?
- Is there a routing layer that lets you shift traffic gradually and roll back?
- Do you know every consumer of the data you plan to move?
- Does each new service have a named owning team?
- Is "delete the old code" an explicit step in the plan?
Modernization is a series of small, safe moves, not one big leap. If you're weighing a rewrite or planning your first extraction, talk to us. We can help you find the right first seam.
Next step
Tell us what you’re working on
Send a short description of your project or problem. You’ll get a reply from our principal architect within two business days, with an honest view on whether we’re the right fit.