A legacy modernization approach is the specific path you choose to update an aging application, from simply moving it to the cloud to rewriting it from the ground up. The industry organizes these paths into an “R-based” framework: Retain, Retire, Rehost, Replatform, Refactor, Re-architect, and Rebuild/Replace. Picking the right R for each application, based on cost, risk, and business value, is what separates a successful modernization program from an expensive one.
This guide explains all seven, clears up a common framework confusion, and gives you a decision matrix to choose the right legacy modernization approach for each system in your portfolio. If you want hands-on help executing any of these paths, see our legacy application modernization services.
What are the 7 R’s of legacy modernization?
The 7 R’s are a framework for deciding how to modernize each legacy application, scoring every option against cost, risk, and long-term business value so you never apply a one-size-fits-all fix across a whole portfolio.
The framework has two related origins that often get blurred together, and untangling them is the first step to choosing well:
- Gartner’s modernization options, a vendor-neutral set of “R” choices (encapsulate, rehost, replatform, refactor, re-architect, rebuild, replace) aimed at application modernization.
- The “7 R’s of cloud migration”, popularized by AWS and echoed by IBM (retain, retire, rehost, relocate, repurchase, replatform, refactor), aimed at infrastructure migration.
The two overlap heavily but were framed for different jobs: one for modernizing application architecture, the other for moving workloads to the cloud. Most competitor guides quietly pick one and ignore the other, which is why teams end up comparing mismatched lists. This guide uses a single, consistent application-focused set so you can map each path cleanly.
The 7 R’s of legacy modernization, in one line each:
- Retain – keep the system as-is and revisit later.
- Retire – decommission the application and preserve its data.
- Rehost – “lift and shift” to new infrastructure with no code change.
- Replatform – lift, tinker, and shift: minor changes to gain cloud benefits.
- Refactor – improve the internal code without changing the architecture.
- Re-architect – restructure the application, often decomposing a monolith into microservices.
- Rebuild / Replace – rewrite from scratch, or buy a COTS/SaaS product.
The 7 modernization approaches, one by one
Each approach below leads with a definition, then covers when it fits, its effort and risk, the trade-offs, and how Saigon Technology applies it.
1. Retain (revisit later)
Retain means deliberately leaving an application unchanged for now and scheduling a future review.
- When it fits: the system still delivers exactly what the business needs, a major dependency is mid-flight, or compliance freezes prevent change.
- Effort / risk: lowest effort, but accumulating technical debt is the hidden risk.
- Trade-offs: zero disruption today, but a deferred decision is still a decision, set a concrete review date so “retain” doesn’t silently become “neglect.”
- STS angle: we tag retained apps in the portfolio assessment with a re-evaluation trigger (e.g., end-of-support date) so they re-enter the roadmap on schedule.
2. Retire (decommission, preserve data)
Retire means shutting down an application that no longer earns its keep, while archiving the data you’re legally or operationally required to keep.
- When it fits: redundant functionality, near-zero usage, or capabilities now covered by another system.
- Effort / risk: low-to-moderate effort; the real work is safe data extraction and dependency mapping so nothing downstream breaks.
- Trade-offs: immediate cost savings and a smaller attack surface, but you must guarantee business continuity for any process that still touches the app.
- STS angle: we move audit-only data to low-cost storage and build lightweight report endpoints so the function survives the app’s retirement.
3. Rehost (“lift and shift”)
Rehosting moves an application to new infrastructure, typically the cloud, with no change to its code. It is the foundational cloud migration move.
- When it fits: the app works fine but the underlying hardware or data center is costly, aging, or being exited.
- Effort / risk: fastest and cheapest of the active approaches; low technical risk.
- Trade-offs: quick wins on infrastructure cost, but you carry the existing architecture’s limitations with you, a lift/shift approach rarely unlocks cloud-native scalability on its own.
- STS angle: we use rehost as a speed play to exit a data center, then schedule a follow-on replatform or refactor once the workload is stable on AWS, Azure, or GCP.
4. Replatform (lift, tinker, and shift)
Replatforming makes targeted changes during the move, such as swapping a self-managed database for a managed cloud service, to gain cloud benefits without rewriting business logic.
- When it fits: you want measurable cloud value (managed services, autoscaling, lower ops) but a full rewrite isn’t justified.
- Effort / risk: moderate; changes are scoped and reversible.
- Trade-offs: better ROI than a bare rehost, at slightly higher effort, a pragmatic middle path and a common application modernization strategy.
- STS angle: typical moves include containerizing with Docker/Kubernetes and adopting managed databases, capturing cloud savings without touching core logic.
5. Refactor (improve code, same architecture)
Refactoring improves the internal quality of the code – readability, structure, dependencies, without changing the application’s overall architecture.
- When it fits: the design is sound but the codebase is brittle, hard to test, or stuck on an unsupported runtime.
- Effort / risk: moderate; contained within the existing structure, so blast radius is limited.
- Trade-offs: reduces technical debt and speeds future delivery, but won’t fix architectural ceilings like an un-scalable monolith.
- STS angle: we frequently refactor while upgrading the platform – .NET Framework → .NET 8+ or Java EE → Spring Boot, and wire in CI/CD so quality improvements stick.
6. Re-architect (decompose monolith → microservices)
Re-architecting restructures the application itself, most often decomposing a monolith into microservices for independent scaling and deployment.
- When it fits: the app is strategically important but its architecture blocks growth, release speed, or cloud-native scalability.
- Effort / risk: high effort and the most architectural risk , best done incrementally, not as a “big bang.”
- Trade-offs: the highest long-term business value and agility, paid for with the most engineering investment.
- STS angle: we decompose incrementally behind an API layer so the system keeps running throughout, see our approach to legacy application migration to the cloud.
7. Rebuild / Replace (rewrite or buy COTS/SaaS)
Rebuild means rewriting the application from scratch; replace means swapping it for a commercial product, a COTS package or SaaS subscription.
- When it fits: the system can no longer meet business needs and neither refactor nor re-architect can close the gap, or a mature off-the-shelf product covers the requirement.
- Effort / risk: highest effort and risk (rebuild) or fastest standardization with the least customization (replace).
- Trade-offs: rebuild gives full control and a clean slate; replace trades bespoke fit for speed, vendor support, and built-in compliance.
- STS angle: we reserve rebuild for genuine differentiators and recommend COTS/SaaS for commodity functions, Saigon Technology replaced a deprecated third-party service on the Welio platform rather than rebuild it.
How to choose the right approach (decision framework)
Score each application against the dimensions below, then pick the lowest-cost, lowest-risk R that still delivers the business value you need.
|
Approach
|
Cost
|
Time
|
Risk
|
Business disruption
|
Long-term value
|
|
Retain
|
None
|
None
|
Low (rising debt)
|
None
|
Low
|
|
Retire
|
Low
|
Low
|
Low-Med
|
Low
|
Med (cost cut)
|
|
Rehost
|
Low
|
Fast
|
Low
|
Low
|
Low-Med
|
|
Replatform
|
Med
|
Med
|
Med
|
Low–Med
|
Med-High
|
|
Refactor
|
Med
|
Med
|
Med
|
Low
|
Med-High
|
|
Re-architect
|
High
|
Slow
|
High
|
Med-High
|
Highest
|
|
Rebuild / Replace
|
High / Med
|
Slow / Fast
|
High / Med
|
High / Med
|
High
|
Decision drivers to weigh:
- Technical debt level, the deeper the debt, the more refactor/re-architect pays off.
- Strategic importance, differentiators justify re-architect or rebuild; commodity apps lean to replatform or replace.
- Risk tolerance & compliance, regulated systems favor incremental, reversible paths.
- In-house skills, limited capacity pushes toward replatform, replace, or a delivery partner.
A quick decision tree: If the app is strategic but the stack is end-of-life → refactor or re-architect. If it works but the infrastructure is costly → replatform (or rehost for speed). If it no longer fits the business and a product exists → replace; if not → rebuild. If it’s redundant → retire; if it’s fine for now → retain with a review date. This per-application thinking is the heart of any sound legacy modernization strategy.
Common pitfalls when choosing an approach
The framework only works if you avoid the classic traps:
- Defaulting to “rewrite.” A full rebuild feels clean but is the riskiest, costliest path, and often unnecessary.
- Underestimating effort. Re-architect and rebuild routinely run longer than planned; scope incrementally.
- One-size-fits-all across the portfolio. Different apps need different R’s; forcing one approach everywhere wastes budget and raises risk.
These mistakes are a leading reason modernization programs stall, we cover the root causes in why legacy modernization projects fail.
How Saigon Technology applies these approaches
We don’t pick a single legacy modernization approach for an entire system. In our discovery phase, we assess per component, mapping dependencies and technical debt, then assigning the right R to each part of the application.
- GTW – we re-architected a legacy monolith into a cloud-native microservices platform on AWS, enabling independent scaling and faster releases.
- Welio – we replaced a deprecated third-party service with a modern, supported integration rather than carrying the risk forward.
Want a per-application recommendation for your own portfolio? Explore our legacy application modernization services or request a free modernization assessment.
FAQs
1. What are the 7 R’s of application modernization?
The 7 R’s are Retain, Retire, Rehost, Replatform, Refactor, Re-architect, and Rebuild/Replace, a framework for choosing how to modernize each legacy application based on cost, risk, and business value.
2. What is the difference between rehosting and replatforming?
Rehosting (“lift and shift”) moves an application to new infrastructure with no code change; replatforming makes targeted changes, such as adopting managed services, to gain cloud benefits without rewriting business logic.
3. Which modernization approach is the cheapest and fastest?
Rehosting is generally the cheapest and fastest because it moves the application without code changes, but it carries the existing architecture’s limitations forward, so it often works best as a first step before replatforming or refactoring.
4.What is the difference between refactoring and re-architecting?
Refactoring improves internal code quality without changing the architecture; re-architecting restructures the application itself, typically decomposing a monolith into microservices for independent scaling and deployment.
5. Is rewriting a legacy application from scratch ever the right approach?
Occasionally, when the system no longer meets business needs and the cost of replicating its logic is justified. For most systems, incremental approaches (replatform, refactor, re-architect) deliver better outcomes at lower risk.