The 7Rs Migration Strategies
Complete the full lesson to earn 25 points
Work through each section, then tap “Mark as Complete” on the last one.
✦ Skip the page breaks and see fewer ads — read each lesson on a single page with Pro
Lesson: Mastering the 7Rs of Workload Migration and Modernization
Introduction: Why Strategy Matters in Migration
When an organization decides to move its digital infrastructure—whether from an on-premises data center to the cloud or from one cloud provider to another—the temptation is often to "lift and shift" everything as quickly as possible. However, history has shown that treating every application the same way is a recipe for inflated costs, technical debt, and operational failure. Migration is not merely a technical exercise in moving bits and bytes; it is a strategic business transformation that requires a nuanced approach to each individual workload.
The "7Rs" framework provides a structured taxonomy for categorizing applications based on their business value, technical complexity, and the desired outcome of the migration effort. By assessing each workload against these seven strategies, architects and decision-makers can determine the optimal path for modernization. Understanding these strategies is crucial because it allows teams to prioritize high-impact migrations, avoid wasting resources on obsolete systems, and ensure that the final destination of an application matches its functional requirements.
In this lesson, we will dissect each of the 7Rs, explore when to use each, provide practical decision-making frameworks, and discuss how to avoid common pitfalls that derail migration projects. Whether you are a lead architect or a project manager, this guide will serve as your manual for navigating the complexities of workload modernization.
The 7Rs Defined: A Strategic Framework
The 7Rs represent the spectrum of effort and modernization intensity required for any given workload. They range from minimal intervention to complete architectural overhaul.
1. Retain (Revisit)
Retain means keeping the application exactly where it is. Not every workload is a candidate for cloud migration. Some applications may have strict regulatory requirements that mandate on-premises hosting, or they may be legacy systems that are slated for decommissioning in the near future. Keeping these systems in place allows you to focus your limited migration budget and engineering bandwidth on applications that will derive actual value from being in a modern environment.
2. Retire
Retire is the process of turning off an application that is no longer useful. During the assessment phase, you will inevitably discover "zombie" applications—services that are running but have no active users, or tools that have been superseded by newer, better-integrated systems. Retiring these applications reduces your attack surface, lowers licensing costs, and simplifies the overall architecture.
3. Rehost (Lift and Shift)
Rehosting involves moving an application to the cloud with little to no modification to its internal code or architecture. You are essentially moving the virtual machines from your local hypervisor to a cloud provider's infrastructure. This is the fastest way to migrate, but it rarely takes advantage of cloud-native features like autoscaling or managed databases.
4. Replatform (Lift, Tweak, and Shift)
Replatforming is a middle-ground approach. You move the application but make minor optimizations to take advantage of cloud capabilities. A common example is migrating a self-hosted database to a managed database service (like RDS or Cloud SQL). You aren't changing the application code, but you are offloading the burden of patching and backups to the provider.
5. Refactor (Re-architect)
Refactoring involves fundamentally changing how the application is built. This might mean breaking a monolithic application into microservices, moving from stateful to stateless architecture, or adopting serverless functions. While this is the most time-consuming and expensive strategy, it yields the highest return on investment in terms of performance, scalability, and developer velocity.
6. Repurchase (Drop and Shop)
Repurchase means moving from a custom-built or legacy application to a software-as-a-service (SaaS) solution. If you are currently hosting your own email server or a custom CRM, moving to a product like Microsoft 365 or Salesforce is a classic example of repurchasing. You stop managing the underlying infrastructure entirely and pay for the functionality as a service.
7. Relocate
Relocating is a specific type of migration where you move the infrastructure to a cloud provider while maintaining the same underlying hypervisor. This is common in scenarios like moving VMware workloads to VMware Cloud on AWS. It allows you to move rapidly without changing your management tools or operational processes.
Decision Matrix: How to Choose the Right Strategy
Choosing the right strategy requires a rigorous assessment process. You cannot simply guess which R applies to which workload. You must evaluate the application's technical health, its business criticality, and the effort required for modernization.
The Assessment Process
- Discovery: Use automated tools to inventory your entire environment. You need to know what servers exist, what ports they communicate on, and what their dependencies are.
- Analysis: Categorize each application based on its business value. Is it a differentiating service that gives you a competitive advantage, or is it a commodity service like payroll or internal ticketing?
- Complexity Mapping: Evaluate the technical debt of the application. Is it a modern web app with clean API structures, or is it a 20-year-old mainframe application with hardcoded IP addresses?
- Strategy Selection: Map the application to one of the 7Rs based on the previous two steps.
Callout: The "Value vs. Effort" Tradeoff When selecting a strategy, always plot your applications on a 2x2 matrix. The X-axis represents "Effort to Modernize," and the Y-axis represents "Business Value." Applications in the high-value/low-effort quadrant should be your first targets. Applications in the low-value/high-effort quadrant are prime candidates for retirement or repurchasing.
Deep Dive: Rehosting vs. Refactoring
To truly understand these strategies, we must look at the technical implications of the two most common approaches: Rehosting and Refactoring.
Rehosting (The "Lift and Shift" Approach)
Rehosting is often criticized, but it is a valid strategy for moving quickly to exit a data center. The risk is that you carry your technical debt with you into the cloud.
Example Scenario: You have a legacy Java application running on a Windows Server 2012 instance. To rehost, you would export the virtual machine image and import it into a cloud environment.
- Pros: Minimal code changes, low risk of breaking functionality, rapid exit from on-premises hardware.
- Cons: You still have to manage the OS, security patches, and backups. You gain no cloud-native benefits like elastic load balancing or auto-scaling.
Refactoring (The "Modernization" Approach)
Refactoring is where the real value of the cloud is realized. By refactoring, you move away from managing servers and toward managing services.
Example Scenario: You have a monolithic e-commerce application. Refactoring involves breaking the "Checkout," "Inventory," and "User Profile" modules into independent services.
# Monolithic Logic (Example)
def process_order(order_data):
# This function does everything: database writes, inventory checks, email sending
# It's hard to scale because you have to scale the whole app
save_to_db(order_data)
update_inventory(order_data)
send_email(order_data)
# Refactored Logic (Microservices approach)
def process_order_event(order_data):
# Now we publish an event to a message broker (like Kafka or SQS)
# Different services consume this event independently
event_bus.publish("order.created", order_data)
In the refactored version, the process_order_event function is decoupled. If the email service fails, the order is still saved and inventory is still updated. This increases the resilience of the system significantly.
Step-by-Step Migration Assessment
Before you move a single byte, you need a repeatable process for assessment. Follow these steps to ensure you aren't making decisions in a vacuum.
Step 1: Define Your Business Goals
Are you migrating to save money, to increase speed, or to retire technical debt? If your goal is cost-saving, you might lean toward Repurchasing or Replatforming. If your goal is agility, you must lean toward Refactoring.
Step 2: Automated Discovery
Manual spreadsheets are the enemy of successful migrations. Use discovery tools to map dependencies. If Application A depends on Database B, you must migrate them in a way that preserves that connection, or you will experience latency issues.
Step 3: The "6-Week Assessment"
Dedicate a specific time-boxed period to assess your portfolio. During this time:
- Identify "low-hanging fruit" (simple apps that can be rehosted).
- Flag "complex dependencies" (apps that are too risky to move right now).
- Conduct stakeholder interviews to understand which applications are actually used.
Step 4: Pilot Migration
Pick one non-critical, low-complexity application and migrate it using your chosen strategy. This "pilot" will teach you about the cloud provider's networking, security policies, and deployment pipeline requirements.
Common Pitfalls and How to Avoid Them
Even with a clear strategy, migrations fail. Here are the most common traps and how to avoid them.
Pitfall 1: The "Lift and Shift" Trap
Many teams rehost everything, thinking they will modernize later. In practice, once an application is moved, the urgency to modernize evaporates. You end up paying more for cloud resources because the app isn't optimized, and you still have the same operational overhead.
- Solution: Set a "Modernization Deadline." If you rehost an app, mandate that it must be refactored or repurchased within 12 months.
Pitfall 2: Ignoring Network Latency
When you move part of an application to the cloud while leaving the database on-premises, you create a "split-brain" architecture. The latency between the app server and the database will likely destroy the application's performance.
- Solution: Always perform a latency test between your on-premises environment and your target cloud region. If the latency is too high, move the database and the app server together.
Pitfall 3: Underestimating Change Management
Migration isn't just about servers; it's about people. Your ops team may not know how to manage managed services, and your developers may not know how to write cloud-native code.
- Solution: Invest in training before the migration starts. Create a "Cloud Center of Excellence" (CCoE) to act as an internal consulting team for migration projects.
Comparison Table: The 7Rs at a Glance
| Strategy | Effort Level | Potential Benefit | When to Use |
|---|---|---|---|
| Retain | Very Low | Minimal | Compliance, legacy, or end-of-life |
| Retire | Low | High | Unused or redundant applications |
| Rehost | Low | Moderate | Quick exit from data centers |
| Replatform | Moderate | Moderate | Minor optimizations, managed services |
| Refactor | High | Very High | High-value, high-scale applications |
| Repurchase | Moderate | High | Moving to SaaS (CRM, Email, etc.) |
| Relocate | Low | Moderate | Moving VMware to VMware-on-Cloud |
Best Practices for Successful Modernization
- Start Small: Don't start with your most critical, revenue-generating application. Start with a dev/test environment or an internal tool.
- Standardize Your Tooling: Use Infrastructure as Code (IaC) like Terraform or CloudFormation. Manual configuration in the console is prone to error and impossible to audit.
- Security First: Never move an application without updating its security posture. Cloud security is different from on-premises security; use identity-based access control rather than perimeter-based firewalls.
- Monitor Everything: Before you migrate, establish a baseline for performance. If you don't know how the app performs today, you won't know if the migration was successful tomorrow.
- Document the "Why": For every application, document why you chose a specific R strategy. This is invaluable when audits happen or when leadership asks why a certain project is taking longer than expected.
Warning: The "Hidden Cost" of Cloud Many teams assume the cloud is cheaper. While it can be, it is often more expensive if you simply rehost inefficient, monolithic applications. You are moving from a capital expenditure (CapEx) model to an operating expenditure (OpEx) model. If you don't optimize your workloads through refactoring or platforming, you will likely see your monthly bill climb significantly.
Practical Code Example: Infrastructure as Code (Terraform)
To demonstrate how Replatforming works, let's look at how you might move from a self-hosted database to a managed service.
Before (Self-Hosted on VM)
In this scenario, you are responsible for patching, backups, and high availability of the database engine.
resource "aws_instance" "db_server" {
ami = "ami-12345678"
instance_type = "t3.medium"
# You have to manage OS updates and DB software updates here
}
After (Replatformed to RDS)
By switching to a managed database service, you offload the management tasks to the provider.
resource "aws_db_instance" "managed_db" {
allocated_storage = 20
engine = "postgres"
instance_class = "db.t3.medium"
username = "admin"
password = "securepassword"
skip_final_snapshot = true
# The cloud provider handles patching and backups automatically
}
Explanation: In the "After" example, you no longer manage an EC2 instance. You have moved the state to a managed service. This is a classic Replatforming move. You didn't rewrite the SQL queries or change the application code, but you significantly reduced your operational overhead.
Advanced Considerations: Handling Data Gravity
Data gravity is the idea that data has mass—the more data you have, the harder it is to move. Applications that depend on large datasets often have to be migrated in a way that respects this gravity.
If you have a 50TB database, you cannot simply "move" it to the cloud overnight. You must plan for data migration services, connection speeds, and potential downtime. Often, the strategy for data-heavy apps involves a period of hybrid connectivity where the application lives in the cloud but reads from an on-premises database, or vice versa, until the data migration is complete.
Data Migration Checklist:
- Bandwidth: Do you have a dedicated connection (like Direct Connect or ExpressRoute) to handle the data transfer?
- Synchronization: Can you use tools like Database Migration Service (DMS) to keep on-premises and cloud databases in sync during the transition?
- Testing: Have you tested the application against the latency of the new database location?
Building a Culture of Modernization
Migration is a unique moment in a company's history. It is the time when you can break old habits. If your team is used to "server-based" thinking, they will struggle with serverless or containerized environments.
The "Migration Mindset"
- Fail Fast: If a migration path isn't working, be willing to pivot. It is better to stop a migration and rethink it than to force a failed strategy on a critical workload.
- Focus on Outcomes: Don't let your team get obsessed with the "perfect" architecture. A "good enough" architecture that is delivered on time and provides value is better than a "perfect" one that never launches.
- Continuous Learning: The cloud provider's feature set changes every month. Ensure your team has time to learn about new services that might allow for a better migration strategy than the one you originally selected.
Frequently Asked Questions (FAQ)
Q: Which of the 7Rs is the most popular? A: Historically, Rehosting (Lift and Shift) has been the most common because it is the fastest. However, as organizations mature, they are shifting toward Replatforming and Refactoring to realize actual cost savings and performance gains.
Q: Can I change my strategy halfway through? A: Yes, but be careful. Changing strategies usually implies you didn't do enough assessment in the beginning. If you start by Rehosting and realize the app is too slow, you will have to pivot to Refactoring, which will increase your project timeline and budget.
Q: What if I have an application that doesn't fit into any of the 7Rs? A: That usually means you need to break the application down. Sometimes, the "App" is actually a collection of three or four smaller services. Apply the 7Rs to each individual service rather than the application as a whole.
Q: Does "Retire" mean I just delete the code? A: No. Retiring involves backing up the data for compliance/historical purposes, notifying stakeholders, shutting down the services, and finally decommissioning the infrastructure. Always ensure you have a data archive strategy before you pull the plug.
Key Takeaways
- Strategy precedes execution: Never start a migration project without categorizing your workloads. Using the 7Rs framework ensures that every app gets the right level of investment.
- Avoid the "Lift and Shift" trap: While Rehosting is fast, it rarely provides the benefits you are looking for in a cloud migration. Always look for opportunities to Replatform or Refactor.
- Prioritize by value: Focus your refactoring efforts on the applications that drive the most business value. Don't waste precious engineering time refactoring a legacy internal tool that no one uses.
- Automate or fail: Use infrastructure as code and automated discovery tools. Manual processes are the leading cause of migration delays and security vulnerabilities.
- Data is the hardest part: Always account for data gravity. Moving the application is easy; moving the data and ensuring it stays in sync is the hardest part of any migration.
- Invest in your people: Technology is only half the battle. If your team isn't trained on the new cloud environment, your migration will result in poor performance and security gaps.
- Iterate and learn: Every migration is a learning experience. Use the lessons from your first few migrations to refine your strategy for the rest of your portfolio.
By applying the 7Rs framework with discipline and careful assessment, you can transform your migration from a stressful "move" into a strategic "upgrade," positioning your organization for long-term success in a modern, cloud-native world.
Enjoying the courses?
Everything stays free. Pro shows fewer ads, doubles your daily points limit so you progress twice as fast, and lets you read each lesson on one page.
- ✓ Fewer advertisements
- ✓ 2× daily points limit
- ✓ Distraction-free lessons