Modernizing a legacy system without a big-bang rewrite

In this article
Most organizations that run on an older system know its problems well. It is hard to change, few people understand it, it does not talk to newer tools, and it may sit on infrastructure that is going out of support. The tempting response is to rebuild it from scratch and switch over on a chosen weekend. That plan fails often enough that it deserves a hard look before anyone commits to it.
Why big-bang rewrites stall
A full rewrite has to reproduce everything the old system does before it delivers any value. That includes behavior nobody documented: the discount rule added for one customer years ago, the report finance relies on at month end, the overnight batch job that quietly corrects bad data. These are usually discovered late, often after launch.
Meanwhile the business does not stop. Regulations change, new branches open, and the old system keeps getting patched. The rewrite is chasing a moving target, and the longer it takes, the further behind it falls. When cut-over day finally comes, everything changes at once for every user, and if something breaks there is no easy way back.
How the strangler pattern works
The strangler pattern takes the opposite approach. Martin Fowler named it after the strangler fig, a plant that grows around a host tree until it can stand on its own. You build the new system around the edges of the old one and move functionality across one piece at a time. Each piece goes live on its own, and the old system shrinks until it can be switched off.
The key component is a routing layer in front of both systems. It can be an API gateway, a reverse proxy or a thin facade inside the application. It receives every request and decides whether the old or the new system handles it. At the start almost everything goes to the old system. As each capability is rebuilt and verified, its route switches to the new one.
Because each switch is small, it can be tested with real traffic, rolled out to one branch or one group of users first, and rolled back by changing a route rather than restoring a database.
Choosing the first slice
The first slice sets the tone for the whole program, so choose it carefully. Good candidates share a few traits:
- They are fairly self-contained, with clear inputs and outputs.
- They cause visible pain today, so the improvement is noticed.
- They are not the most critical path in the business, so mistakes are survivable.
- They can be measured: response times, error counts or the time staff spend on a task.
Reporting is often a good start, because it reads data without changing it. A customer portal or a new mobile channel is another, since it can be built on new services that call the old system behind the scenes. Core accounting postings and stock movements are usually poor first choices, because they touch everything.
Before rebuilding any slice, capture how it behaves today. Record real inputs and outputs and turn them into automated tests. These characterization tests catch the undocumented rules before they are lost.
Handling data during the transition
Data is the hardest part of any modernization. For a period, both systems have to agree on the same customers, orders and balances. There are three common approaches:
- The old system stays the source of truth. The new component reads from it, through an API or replicated tables, and writes back through it. This is simple to reason about, but the old data model constrains the new design.
- Ownership moves entity by entity. Once a slice is migrated, the new system owns that data and the old system receives updates through a sync job or events. This is cleaner in the long run, but synchronization needs monitoring and a clear rule for resolving conflicts.
- Change data capture. Changes in the old database are streamed out as events that the new system consumes, without modifying the old code. This helps when the old system cannot easily be changed.
Whichever approach you use, put reconciliation checks in place from day one. A nightly comparison of counts and totals between the two systems will surface drift long before an auditor or a customer does.
Running both systems, and knowing when you are done
Running two systems in parallel costs money: two sets of infrastructure, sync jobs to maintain, and staff who need to know which system holds what. Keep the transition visible with a simple map of every capability and where it lives today, and review it regularly with the business owners.
Plan the end as deliberately as the start. When only a few functions remain in the old system, decide for each one whether to migrate it, replace it with a packaged product or retire it. Some features turn out to be unused and can simply be switched off. Archive historical data in a form that can still be searched for audits, then decommission the old system for real. A legacy system that is almost entirely replaced but still running is the most expensive outcome of all.
The strangler approach takes longer to show a finished new system than a rewrite promises to. In exchange, it delivers working improvements early, contains risk to one slice at a time, and lets the business change course as it learns.