01 · At a glance
How do the seven approaches compare on cost and risk?
Cost and risk here are qualitative and relative to each other. We do not publish figures because they depend on the application, and we have no numbers we can source.
| Approach | What changes | Cost | Risk | Typical failure |
|---|---|---|---|---|
| 1. Retain and encapsulate | Nothing inside; wrap it with an API | Low | Low | The wrapper hides a problem that keeps growing |
| 2. Rehost | Where it runs; code untouched | Low | Low to medium | Old problems move to a new address, sometimes at higher run cost |
| 3. Replatform | Runtime, server or database, small code edits | Medium | Medium | Hidden vendor dependencies surface late |
| 4. Refactor | Code structure, behaviour kept | Medium | Medium | No tests, so nobody can show behaviour held |
| 5. Rearchitect | Structure and boundaries, such as monolith to services | High | High | Distributed complexity arrives before the benefit |
| 6. Rebuild | Everything; new code from requirements | High | High | Edge-case behaviour lost; two systems to run for a long time |
| 7. Replace | Swap for a bought product or SaaS | Medium to high | Medium | The product does not fit the process, so you customise it back |
02 · Where the list comes from
Where does this taxonomy come from?
The list is adapted from the "7 Rs" that AWS publishes in its Prescriptive Guidance on migration strategies, which names retire, retain, rehost, relocate, repurchase, replatform and refactor or re-architect.
- 01
We dropped retire and relocate, which are about decommissioning and moving virtual machines, and split refactor from rearchitect because the work and the risk differ.
- 02
AWS's definitions are cloud-migration definitions. Ours are about the code and the constraint, so a term can mean slightly more or less than on that page. The same guidance says refactor is the most complex and costly of its strategies and recommends against it for large migrations, which matches our order of preference below.
03 · Approaches 1 and 2
When do retain and rehost work, and when do they fail?
Retain with encapsulation works when the system is stable and the pain is how others connect to it.
- 01
You leave the code alone and put an API in front of it. It fails when the underlying platform is the problem, such as an unsupported runtime, because the wrapper does not change that.
- 02
Rehost moves the application to new infrastructure without code changes; AWS describes it as lift and shift. It works when the constraint is the data center or a hardware contract. It fails when the constraint is the application itself, because you carry every old problem across.
04 · Approaches 3 and 4
When do replatform and refactor work, and when do they fail?
Replatform changes the runtime, server or database with small code edits, for example moving off a costly application server.
- 01
It works when the constraint is a licence or an unsupported platform. It fails when vendor-specific code is deeper than the assessment found; a WebLogic to Tomcat move is the usual place that surfaces.
- 02
Refactor restructures code while keeping behaviour. It works when the code is worth keeping but is hard to change or upgrade. It fails without a test safety net, so write characterization tests first. See also legacy code refactoring.
05 · Approaches 5 and 6
When do rearchitect and rebuild work, and when do they fail?
Rearchitect changes the boundaries of the system, usually breaking a monolith into parts.
- 01
It works when one part needs to scale or change on its own schedule. It fails when the team adopts distributed-system overhead for a system that did not need it; see monolith vs microservices and the strangler fig pattern for the safer route.
- 02
Rebuild writes new code from the requirements. It works when the code cannot be understood or tested, or the business process has changed. It fails on edge cases: the old system encoded years of decisions nobody wrote down, and the new one has to rediscover them.
06 · Approach 7
When does replacing with a bought product work?
Replacing works when the function is generic, such as payroll or ticketing, and a vendor product fits with little customisation.
- 01
AWS calls this repurchase. It fails when the process is specific to your business, because the cost moves into configuration, data migration and retraining.
07 · Choosing
How do you choose between the approaches?
Choose per application, not per estate, and start from the constraint: location, licence, unsupported platform, hard-to-change code, or a changed business process.
- 01
Work from the cheapest approach upward and stop at the first one that removes the constraint.
- 02
The companion page rehost, replatform, refactor or rewrite gives decision rules for four of these. If you need the choice made for your estate, the modernization assessment is a fixed-price piece of work (quote on request) that returns one approach per application, with reasons. The service overview is legacy application modernization.