To rehost an application, migrate it between environments — typically from on-premises to cloud, or in some cases, back to on-premises for specialized workloads — without altering its core architecture or code.
After reading this article you will be able to:
Copy article link
Application rehosting, also referred to as “lift and shift,” is the process of moving an application from an on-premises environment to the cloud with little or no modification to its underlying architecture. This approach allows organizations to migrate workloads quickly without having to re-engineer or deeply modify their applications.
By relocating applications to cloud platforms, businesses can reduce their reliance on physical hardware, cut operational costs, and improve scalability and resilience.
There are several key drivers behind the shift to cloud environments:
While most organizations migrate to the cloud to unlock these benefits, a significant minority — typically large enterprises with specialized workloads — are rehosting certain applications back to on-premises environments to meet unique performance, compliance, or cost considerations.
Application modernization refers to the process of updating and migrating existing software applications — and their underlying infrastructure — to better support an organization's security, performance, and scalability needs. One common approach within this broader effort is rehosting.
While rehosting does not involve significant changes to the application itself, it unlocks the benefits of the cloud and helps support additional modernization efforts — like containerization, microservices adoption, or re-architecting.
In some cases, rehosting is the final step for legacy applications that do not require significant upgrades. In others, it serves as a transitional phase before deeper transformation.
There are several different ways to approach modernizing applications, including:
Each approach has trade-offs in terms of time, cost, and complexity. Rehosting offers speed and simplicity, making it a practical choice for organizations looking to reduce risk while accelerating their cloud adoption.
Rehosting is more than just moving application code from a server in a data center to a virtual machine in the cloud. It is a structured process that includes planning, automation, testing, and scaling — not just of compute resources, but of the entire application infrastructure.
Before rehosting an application in cloud infrastructure, take time to understand what needs to be moved and how it interacts with other systems.
During the discovery phase, map out key application components and dependencies, such as a monolithic application binary (a single deployable unit containing all logic, like a JAR, WAR, or EXE), a server-rendered presentation layer (e.g., JSP, ASP.NET), business logic embedded directly in the application, and a relational database — often a single RDBMS like Oracle, SQL Server, or MySQL.
Also consider common dependencies including application servers (such as Tomcat, WebLogic, or IIS), external APIs, authentication systems, networking rules, hardcoded IPs or endpoints, and any other connected services. This list is not exhaustive, but it captures many of the typical elements found in traditional application architectures.
This step helps prevent surprises during migration and ensures all moving parts are accounted for.
Once key dependencies have been mapped, evaluate what the application needs in its new environment:
This is also the time to assess the supporting stack: DNS, CDN, DDoS protection, and observability. Rehosting is an opportunity to modernize those layers, too.
Cloud providers play a major role in the long-term success of migration efforts. While compute pricing is often the first comparison point, look deeper.
When evaluating cloud or modernization partners, it is important to look for a provider that offers a comprehensive set of capabilities to support performance, security, and operational efficiency. This includes scalable backend services that can grow with demand without introducing unpredictable cost spikes, as well as integrated network-level security features like web application firewalls (WAF), DDoS protection, and granular access controls.
A global content delivery network (CDN) is also essential to ensure fast, consistent delivery of both static and dynamic assets to users around the world. Providers should offer built-in DNS services that are not only fast and reliable, but also programmable to support automation and resilience.
Finally, native observability tools — or seamless integration with existing logging and monitoring stacks — are critical for maintaining visibility and control as applications scale and evolve.
Migration success is when an application runs correctly, securely, and efficiently. After rehosting, it is important to benchmark key performance indicators like latency and throughput against the on-premises baseline to ensure the application meets user expectations. Running load tests can help simulate real-world demand and uncover issues that might not appear under normal conditions. Reviewing logs and alerts is also critical for identifying anomalies or misconfigurations that could impact reliability or security.
Beyond application performance, teams should also validate supporting infrastructure components — including DNS resolution, CDN behavior, TLS configurations, and firewall rules — to confirm they are functioning as intended in the new environment.
As part of the migration cutover, traffic steering plays a key role in ensuring a smooth transition with no customer-facing downtime. Techniques such as DNS-based traffic shifting, weighted load balancing, and canary deployments can help gradually migrate users from the on-premises environment to the cloud-based version of the application. This allows teams to monitor system behavior in real time, identify issues early, and roll back changes if needed — all without disrupting end-user experience. Careful coordination of DNS TTLs, health checks, and monitoring coverage is essential to maintain service continuity during this critical phase.
Scaling should be proactive. Consider autoscaling groups or serverless options if appropriate for current workloads. And monitor cloud spend — cost optimization in cloud migration doesn’t stop after applications are launched in the cloud.
Post-migration, continuous observability can help:
Implement cloud-native or third-party monitoring to support:
Rehosting is often ideal when organizations need to migrate quickly, avoid heavy development effort, or extend the lifespan of a legacy system. It can also be the right fit for organizations looking to reduce physical infrastructure dependencies while beginning a broader IT infrastructure transformation.
Rehosting is most effective in scenarios where organizations have stable but expensive legacy applications that are becoming burdensome to maintain on-premises. It is also a strong fit when there is a need to exit a data center quickly, or when the priority is to move to the cloud with minimal disruption to the existing application codebase.
For teams planning broader modernization efforts down the line, rehosting can serve as a strategic first step — enabling foundational changes today while preserving flexibility for future refactoring. In these cases, rehosting helps extend the value of legacy applications without requiring immediate rewrites, effectively buying time to modernize further when the organization is ready.
When evaluating rehosting as an application modernization path, consider:
Rehosting can help manage risk and resource constraints by providing a relatively low-friction path to the cloud.
Rehosting can deliver short-term cost optimization in cloud migration by reducing hardware maintenance and licensing costs, data center overhead, and infrastructure provisioning time. However, rehosting alone may not fully optimize long-term costs. Without refactoring or replatforming, applications may not use cloud-native efficiencies like autoscaling, serverless, or managed services.
In the short term, organizations can achieve fast ROI by eliminating capital expenditures and removing the need for physical infrastructure. Over the long term, however, realizing true cost efficiency requires deeper optimization — such as tuning compute usage, rightsizing instances, and decoupling monolithic services to improve scalability and resource allocation.
While rehosting can reduce some security risks, like reliance on patching vulnerable and outdated infrastructure, it also creates new ones. Applications that were secure in a controlled on-premises environment might be exposed in a less controlled cloud setting unless steps are taken to secure them properly via a cloud-native security platform.
Cost is another key consideration. Without proactive management, rehosted applications can generate higher-than-expected cloud bills. For example, egress fees — charges for moving data out of a cloud provider’s environment — can add up quickly, especially for data-intensive applications.
To avoid unexpected costs after migrating to the cloud, organizations should take a proactive approach to resource and cost management. This includes closely monitoring usage trends to identify patterns and anomalies, and establishing clear cost governance policies to define ownership and accountability. Automating tasks like rightsizing and scheduling of underutilized resources can help reduce waste and optimize spend. Additionally, setting budgets and alerts within cloud platforms provides early warning signals before costs exceed acceptable thresholds, helping teams stay in control as environments scale.
Every migration strategy should incorporate security as a core consideration throughout the process, including:
A successful rehost requires more than copying an app to the cloud. Poorly executed cutovers can result in:
One common issue: customers or partners may rely on static IP addresses tied to an application’s old data center. If those IP addresses are not updated on their side, traffic fails. Organizations must anticipate these dependencies and proactively coordinate with stakeholders to ensure a smooth cutover.
A well-planned rehost includes:
Cloudflare accelerates application modernization by transforming video and images, load balancing apps, and resolving DNS globally for fast, reliable performance. Automated protection defends against bots, DDoS, and zero-day attacks, while integrated observability ensures compliance across cloud environments. With these capabilities, Cloudflare strengthens every layer of the application stack for secure, high-performing, and future-ready modernization.
Learn more about application modernization.