What is the difference between rehosting and refactoring?

When an organization decides to move its data or applications into a cloud service provider (CSP) such as Amazon Web Services (AWS), Google Cloud Platform (GCP), or Microsoft Azure, it is termed cloud migration.

The following are three methodologies frequently used when moving to the cloud:

  • Rehosting

  • Refactoring

  • Replatforming

These three strategies have distinct advantages, challenges, and use cases.

Rehosting

Rehosting, often referred to as lift and shift, involves moving applications from a current environment to the cloud without modifying their design. It’s similar to picking up a house and moving it to a new location without changing its structure or interior layout. The main aim is to replicate the same system in a new hosting environment.

Refactoring

Refactoring or rearchitecting, on the other hand, is the process of modifying the existing code base to improve its structure, efficiency, or readability without changing its external behavior. When applied to cloud migration, refactoring involves making changes to the application so it can take advantage of cloud-native features.

Replatforming

Replatforming, sometimes referred to as lift, tinker, and shift, involves minor upgrades to leverage some cloud functionalities without changing the core architecture of the application. It’s like moving a house to a new location and then changing the interior design slightly to take advantage of the features of the new location. The main goal is to gain some tangible benefits from the cloud without the cost of significant changes or full refactoring.

Benefits and drawbacks

The benefits and drawbacks of rehosting and refactoring are:

Benefits and Drawbacks


Rehosting

Replatforming

Refactoring

Speed and Time

Faster to implement


Moderate

More time-consuming

Cost

Lower upfront costs


Moderate upfront costs

High upfront but lower operating costs

Efficiency

Less efficient


More efficient than rehosting but less than refactoring


Highest efficiency

Complexity

Lower complexity


Moderate complexity


Higher complexity

Cloud-Native Features


Limited utilization


Partial utilization


Full utilization


Conclusion

The choice between rehosting, replatforming, and refactoring depends on several factors, including the nature of the application, the organization’s goals, the time and resources available, and the specific features of the cloud service being used.

  • Rehosting: If the primary goal is a quick migration with minimal changes and disruption, rehosting might be the best choice.

  • Replatforming: If the aim is to leverage some cloud capabilities without significant changes, replatforming might be a good option.

  • Refactoring: If the objective is to fully exploit the capabilities of the cloud environment for performance, scalability, and cost benefits, refactoring might be the better option.

In reality, many organizations adopt a hybrid approach, rehosting some applications for quick wins, replatforming others for moderate benefits, and refactoring others over time to gain more significant benefits. This way, they can balance the need for speed and simplicity with the desire to optimize for the cloud environment.

Free Resources

Copyright ©2025 Educative, Inc. All rights reserved