The Short Answer
What is the safest way to modernise a legacy system?
Replace it gradually. Put a layer in front of the old system, rebuild one function at a time on a modern platform, route users to each new part as it is ready, and retire the old system only when nothing depends on it. This is known as the strangler fig approach, and it avoids the long, high-risk gap of a full rewrite.
A legacy system is not simply an old one. It is a system the business depends on that has become hard to change, hard to staff or hard to secure. Many are also the most valuable software the company owns, because years of business rules live inside them.
How to Tell It Is Time
- Changes take months. Small requests are quoted in weeks and delivered late.
- Only one or two people can work on it. Or the supplier who built it has gone.
- The technology is out of support. No security updates for the language, framework, database or operating system.
- It cannot connect. No API, so new tools need manual exports.
- Running costs are rising. Specialist hosting, licences and contractor day rates.
- It blocks the business. A product, market or partnership is waiting on it.
If you are unsure how serious the position is, commission an assessment first. Our guide to technical due diligence describes what a review covers.
The Six Options
| Option | What it means | Use when |
|---|---|---|
| Retain | Leave it, with better monitoring and documentation | It works, changes rarely, and risk is contained |
| Rehost | Move it to modern infrastructure unchanged | Hardware or hosting is the problem, not the software |
| Replatform | Upgrade the database, runtime or framework version | The code is sound but its foundations are out of support |
| Refactor | Restructure the code without changing what it does | The design is hard to change but the logic is right |
| Replace gradually | Rebuild function by function alongside the old system | The system is critical and too large to replace safely at once |
| Replace with a product | Buy an off-the-shelf system | The process is standard and products now cover it |
These are not exclusive. A common plan rehosts first to remove immediate hosting risk, then replaces gradually. For the last option, see custom software vs off-the-shelf.
Why Full Rewrites Disappoint
The instinct is to start again with a clean design. It is rarely the best route, for four reasons.
- Hidden rules. The old system encodes years of exceptions nobody remembers. A rewrite rediscovers them one bug at a time.
- A moving target. The business keeps changing while the new system is built, so the specification is out of date before launch.
- No value until the end. Money is spent for a year or more before anyone benefits.
- Size. Large projects fail far more often than small ones, as the Standish Group and McKinsey figures above show.
A rewrite can still be right for a small system, or where the technology is so obsolete that nothing can be reused. For anything large and business-critical, prefer gradual replacement.
Gradual Replacement, Step by Step
Martin Fowler named the strangler fig pattern after a plant that grows around a tree until it can stand on its own. Applied to software, it works like this.
- 1
Map what the system does
List its functions, users, data and connections. Record how often each part is used.
- 2
Put a routing layer in front
A gateway through which every request passes, so traffic can be sent to old or new parts without users noticing.
- 3
Choose the first slice
Something valuable but contained: a report, a customer-facing page, one workflow.
- 4
Build the slice on the new platform
With automated tests that compare its results with the old system.
- 5
Keep the data in step
Synchronise old and new databases while both are live. This is the hardest engineering in the project; plan for it.
- 6
Switch the slice over
Route a small share of users first, then everyone.
- 7
Repeat
Each slice delivers value and reduces what remains.
- 8
Decommission
When nothing calls the old system, archive its data and switch it off.
Data Is the Hard Part
Code can be rewritten. Data has to be carried across intact. Before any slice goes live, agree which system is the master for each kind of record, how changes flow between the two, and how you will prove nothing was lost. Reconcile counts and totals daily during the transition. Keep a tested way to roll a slice back.
Building the Business Case
| Element | Question it answers |
|---|---|
| Cost of doing nothing | What do support, contractors, workarounds and incidents cost each year, and what is the exposure if it fails? |
| Opportunities blocked | What revenue or savings are waiting on the change? |
| Phased investment | What does each slice cost, and what does it deliver? |
| Risk reduction | Which security, compliance or key-person risks does each phase remove? |
| Stop points | Where could the programme pause and still leave the business better off? |
Funding by slice keeps the commitment small and the evidence fresh. It is the same principle as building an MVP; see MVP development for established companies.
Mistakes to Avoid
- Copying the old system screen for screen. You rebuild its faults. Ask what each function is for.
- Modernising everything. Parts that work and rarely change can stay.
- Freezing the business for the duration. Urgent changes will be needed; plan how they reach both systems.
- No retirement date for the old system. Running two systems indefinitely costs more than either.
- Losing the people who know it. Involve them early. Their knowledge is the specification.
If you are responsible for a system like this and want an outside view on the options, tell us what it does and what it runs on.
Frequently Asked Questions
What is a legacy system?
A system the business depends on that has become difficult to change, support or secure, usually because of outdated technology, missing documentation or a shortage of people who understand it.
Should we rewrite our legacy system from scratch?
Rarely for a large, critical system. Full rewrites take long, deliver no value until the end and tend to miss rules hidden in the old code. Gradual replacement is usually safer.
What is the strangler fig pattern?
A way of replacing a system in pieces. New functions are built alongside the old system and traffic is routed to them one at a time until the old system can be switched off.
How long does legacy modernisation take?
It depends on the size of the system. With gradual replacement, the first slice can be live within a few months, and the programme continues slice by slice, delivering value throughout.
How much does it cost to modernise a legacy system?
Cost follows scope. Price it by slice, and compare each slice with the yearly cost and risk of leaving that part as it is.
Can we modernise without downtime?
Largely, yes. Running old and new parts side by side behind a routing layer lets you switch users gradually and roll back if a problem appears.