Explainer 7 min read

Legacy application modernisation: the 7 Rs, the strangler fig and how to sequence it

By AKINO Labs · Updated

The short answer

Legacy application modernisation is the work of moving an ageing system onto a platform and architecture the business can keep changing. Most programmes choose one of the 7 Rs per application, from retire to refactor, and replace the hardest systems incrementally, running old and new side by side so the business never has to stop.

Key takeaways

  • Choose a strategy per application, not one strategy for the whole estate.
  • Retiring what nobody needs is the cheapest modernisation there is.
  • For large estates, AWS recommends migrating first and modernising afterwards, because refactoring during the move is the most complex option.
  • The strangler fig pattern replaces a system piece by piece behind a routing layer, so risk is spread across many small cutovers.
  • Data migration needs one system of record per entity at every moment, and reconciliation the business signs off.

What is legacy application modernisation?

Legacy application modernisation is changing an existing system so the business can keep running it and changing it at a reasonable cost. The system is usually still valuable: it holds the rules, the data and the edge cases the organisation has accumulated over years. The problem is what it costs to change.

The signs are familiar:

  • Changes take months. A small rule change needs a specialist, a long test cycle and a release window.
  • Knowledge is thin. The people who understand the code are few or gone, and the documentation stopped matching the code years ago.
  • The platform is unsupported. The operating system, database or runtime is out of vendor support, so every vulnerability becomes an exception to manage.
  • Integration is painful. New channels and partners need data the system can only give up through batch files or direct database access.

Modernisation is not the same as migration. Moving a system to the cloud unchanged is a migration. It can be a sensible first step, but it leaves the cost of change where it was. Modernisation is judged on whether the next change is cheaper, faster and safer than the last one.

What are the 7 Rs of cloud migration?

The 7 Rs are seven migration strategies, set out in AWS Prescriptive Guidance, that describe what happens to each application when an estate moves: retire, retain, rehost, relocate, repurchase, replatform, and refactor or re-architect. The labels come from AWS, but the decisions apply on any cloud, and to modernisation that never leaves the data centre.

AWS's guidance makes one point worth repeating. Refactoring during a large migration is the most complex and costly option, and hard to manage across many applications. It recommends rehosting, relocating or replatforming first and modernising once the migration is complete. That is the core of rehost vs refactor: rehost is fast and changes little; refactor changes the most and costs the most.

The 7 Rs, as described in AWS Prescriptive Guidance
StrategyWhat happensWhen it fits
RetireThe application is decommissioned or archivedNo business value, little or no use, unsupported components
RetainIt stays in the source environment for nowData residency, high risk, unresolved dependencies, mainframe and mid-range systems that need careful planning
Rehost (lift and shift)Moves to cloud infrastructure with no application changesLarge estates that need to move quickly and optimise later
RelocateMany servers move at once to a cloud version of the same platformNo change to architecture, hardware purchases or operations
Repurchase (drop and shop)Replaced by a different version or product, often SaaSA commodity capability that a product already covers
Replatform (lift, tinker and shift)Moves with some optimisation, such as a managed database or containersLower running cost without a rewrite
Refactor or re-architectArchitecture redesigned around cloud-native featuresA monolith that blocks delivery, a mainframe that no longer meets demand, very low test coverage

How do you choose a modernisation strategy for each application?

Choose per application by scoring each one on business value, technical condition and the cost of change, then mapping the score to a strategy.

  1. Inventory. List every application with its owner, users, dependencies, data stores, licences and support status. Discovery tools help, but owners know which batch job keeps finance running.
  2. Score value. What would the business lose if this stopped? Is it a differentiator or a function every organisation runs?
  3. Score condition. Test coverage, platform support, how many people can change it safely, how often it fails.
  4. Map to a strategy. Use simple rules first, then argue the exceptions.
  5. Revisit. Expect some first answers to change once dependencies are mapped properly.

A starting rule set:

  • Low value, little use: retire.
  • A common function with mature products on the market: repurchase. Our guide to build vs buy covers that call.
  • Healthy code on ageing infrastructure: rehost or replatform.
  • High value, poor condition, blocking the roadmap: refactor, incrementally.
  • Too risky or too entangled to touch this year: retain, with a date to look again.

Mainframe modernisation follows the same logic with higher stakes. AWS lists mainframe, mid-range and non-x86 Unix applications among those that need careful assessment before any move, and names a mainframe that can no longer meet business demand as a common reason to refactor. Mainframe estates are rarely moved in one step: teams usually wrap the mainframe with APIs, move reporting and read traffic first, and carve out transactions one domain at a time.

What is the strangler fig pattern?

The strangler fig pattern replaces a legacy system gradually: new components are built around the old one, take over its behaviour piece by piece, and the old system is switched off when nothing depends on it. Martin Fowler named it after strangler fig vines he saw in Queensland, which grow around a host tree until they stand on their own.

Fowler's 2024 write-up describes four activities, not a strict sequence: define the outcomes you want, break the problem into parts along the seams in the system, deliver those parts starting with low-risk components, and change the organisation so the work can continue.

How it works in practice

  1. Put a routing layer in front. A proxy, API gateway or façade receives every request and sends it to the old system by default.
  2. Pick a seam. A bounded piece of behaviour with clear inputs and outputs: a report, a pricing rule, a customer lookup.
  3. Build the replacement and run it in shadow. Send the same inputs to old and new, compare the outputs, and fix differences before any user sees the new path.
  4. Switch the route. Move traffic for that seam to the new component, with the old path kept as a fallback.
  5. Repeat, then retire. When no route points at the old system, decommission it.

Fowler calls the temporary scaffolding that lets old and new coexist transitional architecture, and argues its cost is worth the reduced risk. Budget for it explicitly. It is the part most often cut from the plan and most often missed later.

The alternative, a full rewrite with a single cutover, puts all the risk on one date and delivers nothing until that date. It can work for small systems with clear specifications. For a system that holds years of undocumented rules, it is the riskiest option available.

How do you migrate legacy data without losing it?

Migrate data with the same incremental discipline as the code: profile it first, move it in stages, keep it synchronised while both systems run, and reconcile before every cutover.

  • Profile before you map. Legacy data carries nulls that mean something, codes nobody documented and fields reused for a second purpose. Find them before writing transformations.
  • Name one system of record per entity. While old and new both run, every customer, order or account needs exactly one authoritative home at any moment. Two writers without a rule is how data diverges.
  • Synchronise, then cut over. Change data capture or scheduled replication keeps the new store current while the old one stays authoritative.
  • Reconcile with numbers. Row counts, control totals and sampled record comparisons, signed off by the business owner as well as the engineers.
  • Keep the way back. Hold the old store read-only until the new one has run through at least one full business cycle, such as a month end.

How do you control risk and sequence a modernisation programme?

Control risk by making each step small and reversible, and sequence the programme so early steps teach the team and fund later ones.

Sequencing

  1. Retire first. Every application switched off is one fewer to migrate, secure and license.
  2. Build the foundations. Landing zone, identity, networking, CI/CD and observability before the first serious workload.
  3. Start with a real but low-risk workload. Something people use, but not the system that runs month end.
  4. Move in waves. Group applications by dependency so tightly coupled systems move together.
  5. Modernise the core last, incrementally. The high-value, high-risk systems get the strangler fig treatment once the team and platform are proven.

Risk controls

  • Automated tests around current behaviour before you change it, even if they only record what the system does today.
  • Feature flags and routing, so any slice can be switched back in minutes.
  • Cutovers scheduled away from business peaks, with a rehearsed rollback.
  • A named business owner for each application who signs off each cutover.
  • A written definition of done for decommissioning, so the old system actually goes away.

The cloud migration runbook template turns these controls into a step-by-step cutover plan.

How AKINO Labs approaches modernisation

AKINO Labs modernises legacy systems incrementally, with the old and the new running side by side until the migration is complete. Our software development and modernisation practice starts with a legacy assessment and an incremental modernisation roadmap, and hands back documentation, tests and a codebase your own engineers can read and maintain, exported on demand.

One example from that practice: a fourteen-year-old order system replaced while it kept taking orders. Where the move involves infrastructure, our cloud infrastructure practice plans landing zones, network design and staged migration off legacy hosting, so the cutover is uneventful and reversible.

If you are deciding which applications to retire, rehost or rebuild, talk to us about a legacy assessment.

Questions people ask

What is the difference between rehost and refactor?

Rehosting moves an application to cloud infrastructure without changing it. Refactoring redesigns its architecture around cloud-native features, which takes longer and costs more but changes how cheaply the system can be modified afterwards.

Which of the 7 Rs is the cheapest?

Retire usually saves the most, because a decommissioned application needs no migration, hosting, licences or patching. Of the strategies that keep an application running, rehost and relocate usually need the least upfront effort.

Is the strangler fig pattern only for microservices?

No. It describes replacing a system piece by piece behind a routing layer, and the new pieces can be services, modules of a single application or a purchased product.

Should we modernise before or after moving to the cloud?

For large migrations, AWS recommends rehosting, relocating or replatforming first and modernising after the migration is complete. For a single high-value system that blocks the roadmap, modernising as part of the move can be justified.

How long does legacy application modernisation take?

It depends on the number of applications, how entangled they are and the strategies chosen. Incremental approaches deliver working pieces early, so value arrives in stages rather than on a single cutover date.

Sources

  1. About the migration strategies. AWS Prescriptive Guidance. Defines the seven migration strategies (retire, retain, rehost, relocate, repurchase, replatform, refactor or re-architect) and recommends against refactoring during large migrations in favour of modernising after the move.
  2. Strangler Fig. Martin Fowler. Describes gradual replacement of a legacy system, the origin of the name, four high-level activities and the role of transitional architecture.
Talk to an expert

Want this worked through on your own operation?

Send one sentence on what you are trying to fix. A practitioner replies with a straight view of what to build, what to buy and what to leave alone.

  • A reply from a practitioner, not a sales script.
  • A prioritised view of what to build, what to buy, and what to leave alone.
  • No obligation. If we are not the right fit, we will say so.
Kinjal DesaiFarhad WadiaHemang ShahMonesh ShahaniA principal replies within one business day.
Or use the full contact form

A quick “I'm not a robot” check appears here when you start.

Used only to reply to you. Privacy policy

Looking for a job? Introduce yourself to the hiring team.