Insights · Technology
Modernising a legacy system without stopping the business
To modernise a legacy system without a full rewrite, replace it in slices. Put a routing layer in front of the old system, rebuild one contained function at a time, move its traffic across, and keep the old path as a fallback until the new one proves itself. Plan the data early and make every switch reversible.
By Manish Sharma, Founder of AXVU · · 3 min read
Decide what each part of the system needs
A legacy system is rarely one thing. It is a set of functions, data and integrations, and each may deserve a different decision. AWS's migration guidance groups the options into seven strategies, known as the 7 Rs. They are written for moving to the cloud, but they work as a checklist for any modernisation:
- Retire: switch off what nobody uses any more.
- Retain: leave alone what works and isn't worth touching yet.
- Rehost: move it to new infrastructure with no changes.
- Relocate: move it as a whole to a different environment without changing how it runs.
- Repurchase: replace it with an off-the-shelf or SaaS product.
- Replatform: make targeted changes, such as moving to a managed database, without rewriting it.
- Refactor or re-architect: rebuild it, which brings the most benefit and takes the most effort.
Why the big-bang rewrite usually disappoints
Rewriting everything and switching over on one day means months or years of work before anyone gets any value, while the old system keeps changing underneath you. Old systems also hold years of undocumented rules, and a rewrite tends to discover them only when the new version gets something wrong in front of a customer.
There is also no easy way back. If the new system fails on launch day, the business is stuck between two half-working systems.
Replace it in slices: the strangler fig approach
Martin Fowler named this approach after the strangler fig, a plant that grows around a host tree until it can stand on its own. In software, you put a layer in front of the old system that routes each request to either the old code or the new code. You then rebuild one function at a time, switch its traffic to the new version, and repeat.
Microsoft's architecture guidance describes the same pattern. Each slice delivers value on its own, the old system remains available as a fallback, and the business keeps running throughout. The costs are running two systems for a while and keeping the routing layer simple.
Choose the first slice carefully
Start with a function that is valuable but contained: it changes often, causes regular pain and has few connections to the rest of the system. Customer-facing portals, reporting and integrations with newer tools are often good candidates. Core calculations that everything depends on usually come later, once the team understands the old system's rules.
Plan the data as carefully as the code
Data is where modernisation projects most often stall. Decide early which system owns each type of record during the transition, how the two will stay in step, and how you'll check that migrated data is complete and correct.
Run test migrations on copies of real data well before the switch, compare totals and samples between old and new, and keep the old data readable after the move for audits and questions.
Make each step reversible
Every switch should have a way back: a setting that sends traffic to the old path, a tested rollback and a clear owner for the decision. Release to a small group of users or a share of traffic first, watch errors and complaints, then widen.
Finally, actually retire the old parts. A modernisation that leaves both systems running indefinitely doubles the cost it was meant to reduce.
Then decide who looks after the new parts once they are live: security patches, platform updates and fixes. Our guide to what a maintenance agreement should cover lists the clauses to agree before the project ends.
Sources
- Strangler Fig, Martin Fowler
- About the migration strategies (the 7 Rs), AWS Prescriptive Guidance
- Strangler Fig pattern, Microsoft Azure Architecture Center