6(R’) Strategies for Cloud Migration - All IN ONE
Tags: cloud, migration, strategies, devops
Published: 2022-07-23 15:56:00

## What is a Cloud Computing?

"**NIST**" take on cloud computing,

> "Cloud computing is a model for enabling ubiquitous, convenient, on-demand network access to a shared pool of configurable computing resources (e.g., networks, servers, storage, applications, and services) that can be rapidly provisioned and released with minimal management effort or service provider interaction. This cloud model is composed of five essential characteristics, three service models, and four deployment models."

"**The Gartner**" take on cloud computing,

> "Gartner defines cloud computing as a style of computing in which scalable and elastic IT-enabled capabilities are delivered as a service using Internet technologies. With cloud computing transforming digital transformation by revolutionizing IT, the benefits of migrating to the cloud are many."

"**Forrester**" take on cloud computing,

> Forrester defines cloud computing as “a standardized IT capability (services, software, or infrastructure) delivered via Internet technologies in a pay-per-use, self-service way.

and In general,

> Cloud computing is the on-demand delivery of computing power, database, storage, applications, and other IT resources via the internet with pay-as-you-go pricing. These resources run on server computers that are located in large data centers in different locations around the world. When you use a cloud service provider like AWS, Azure, GCP, etc., that service provider owns the computers that you are using. These resources can be used together like building blocks to build solutions that help meet business goals and satisfy technology requirements.

## What are the Key Business Drivers for Cloud Adoption?

Cloud migration describes the process of moving the organization’s business applications from the on-premises data center to virtual cloud infrastructure or cloud services.

Many business factors are driving organizations to adopt a cloud migration path to realize the maximum benefits of the cloud.

Embracing Cloud migration services provides you with the following benefits:

- Cloud computing allows businesses to shift their focus from infrastructure and platforms and focus on innovation at the application level.
- Cloud deployments have unmatched availability, scalability, and agility of cloud resources as compared to on-premises deployments. One can achieve improved disaster recovery and business continuity by relying on an always-on infrastructure provided by the cloud service provider.
- On-demand usage patterns and pay-as-you-go cost management offered by the cloud help organizations convert huge CAPEX spends to smaller chunks of OPEX.
- Cloud computing is an attractive alternative to replace on-premises hardware/software components that have reached end-of-life.
- Cloud computing also allows businesses to leverage services that may not be available on-premises, leading to an optimal best-of-breed hybrid architecture.
- A side benefit of the move to cloud computing is that businesses can reduce environmental waste by reducing the hardware and physical products they use.

## What are the Advantages of cloud computing?

**Advantage #1: Trade capital expense for variable expense**
Capital expenses (CAPEX) are funds that a company uses to acquire, upgrade, and maintain physical assets such as property, industrial buildings, or equipment. Do you remember the data center example in the traditional computing model where you needed to rack and stack the hardware, and then manage it all? You must pay for everything in the data center whether you use it or not. By contrast, a variable expense is an expense that the person who bears the cost can easily alter or avoid. Instead of investing heavily in data centers and servers before you know how you will use them, you can pay only when you consume resources and pay only for the amount you consume. Thus, you save money on technology. It also enables you to adapt to new applications with as much space as you need in minutes, instead of weeks or days. Maintenance is reduced, so you can spend focus more on the core goals of your business.

**Advantage #2: Benefit from massive economies of scale**
By using cloud computing, you can achieve a lower variable cost than you can get on your own. Because usage from hundreds of thousands of customers is aggregated in the cloud, providers such as AWS can achieve higher economies of scale, which translates into lower pay-as-you-go prices.

**Advantage #3: Stop guessing capacity**
Eliminate guessing about your infrastructure capacity needs. When you make a capacity decision before you deploy an application, you often either have expensive idle resources or deal with limited capacity. With cloud computing, these problems go away. You can access as much or as little as you need, and scale up and down as required with only a few minutes’ notice.

**Advantage #4: Increase speed and agility**
In a cloud computing environment, new IT resources are only a click away, which means that you reduce the time it takes to make those resources available to your developers from weeks to just minutes. The result is a dramatic increase in agility for the organization because the cost and time that it takes to experiment and develop are significantly lower.

**Advantage #5: Stop spending money on running and maintaining data centers** 
Focus on projects that differentiate your business instead of focusing on the infrastructure. Cloud computing enables you to focus on your customers instead of the heavy lifting of racking, stacking, and powering servers.

**Advantage #6: Go global in minutes** 
You can deploy your application in multiple AWS Regions around the world with just a few clicks. As a result, you can provide lower latency and a better experience for your customers simply and at a minimal cost.

A migration might consist of moving a single data center, a collection of data centers, or some other portfolio of systems that is larger than a single application. 

## What is Migration? Why Migrate to Cloud?

Cloud migration isn’t just about moving to the cloud, It is the process of transferring data, applications, and workloads, from On-Premises to the Cloud(AWS, Azure, GCP, etc.) It is an iterative process of optimization to reduce costs and reach the full potential of the cloud. It impacts all the organizational aspects including people, processes, and technology. But with flexible consumption and pricing models, the cloud can support high scalability, performance, agility, remote work, and cost-efficiency.
Cloud Migration is the process of transferring data, applications, and workloads, from On-Premises to the Cloud(AWS, Azure, GCP, etc.).

The decision to migrate to the cloud can be driven by several factors, including data center lease expiration, required hardware upgrades, software license renewals, location requirements to meet regulatory compliance, global market expansion, increased developer productivity, or the need for a standard architecture. 
While there are several common components found in each successful migration, there is no one-size-fits-all solution to deciding on the best approach.

## Why?

**Operational Cost:** Operational costs are the cost of running your infrastructure.
**Workforce Productivity:** Workforce productivity is how efficiently you can get your services to market.
**Cost Avoidance:** Cost Avoidance is setting up an environment that does not create unnecessary costs.
**Operational Resilience:** Operational resilience is reducing your organization's risk profile and the cost of risk migration.
**Business agility:** Ability to react quickly to changing market conditions. you can expand into new markets, and take products to market quickly.

## The 6R’s of Strategies for Migration to the Cloud

There are six common cloud migration paths (also known as the six Rs) for cloud migration based on the level of cloud integration that an organization desires.
![Migration Strategies](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6s2cpezabo215yejpdh3.jpg)

## 1) Refactor/Re-architect("Architected using Cloud-Native Feature.")
### Definition of Refactor
`Writing a new version of the existing application, with a new architecture and design in mind. In a refactor, you gain by removing any unnecessary components, leveraging newer application technologies in the cloud, and generally providing an improved user experience and performance.`

This strategy involves converting a legacy monolithic application into a new, highly decoupled, and cloud-native architecture. 
This is usually driven by a strong desire to improve a service or application. For highly critical applications that require cloud-native characteristics or applications that need thorough modernization due to outdatedness or performance issues a higher migration effort is typically profitable and hence should be part of cloud considerations.
It is the strategy that usually leads to the highest transformation cost and is much more complicated than other cloud migration approaches because it requires application code changes and must be tested carefully to avoid regressions in functionality. However, it allows optimized use of the cloud, leading to cloud-native benefits and making the application future-proof.
Typically this involves breaking down the application’s components into smaller building blocks, and microservices and wrapping them into (Docker) containers for deployment on a container platform.

### Use Cases:
Use Refactor if,

- The application will gain the most from the cloud.
- There is a strong business drive to add scalability, speed, and performance.
- An on-premise app is not compatible with the cloud.

## 2) Replatform("lift-tinker-and-shift.")
### Definition of Replatform
`Changing the underlying infrastructure technology that an application runs in today, as we move it to the cloud. Some application changes may be required, but not a complete refactor.`

Replatforming leads to cloud optimizations to the application during the migration stage due to some cloud platform adoption, while keeping the application core architecture the same, so that does require some programming input and expertise. 
Replatformed applications show some cloud-native characteristics like horizontal scaling and portability. Often, Replatforming is used when replacing database backends of applications with a corresponding PaaS database solution of a cloud provider.
For example, you might end up moving from your relational database system to a turnkey managed RDS on a cloud provider — same underlying tech, a different business model with cloud resiliency auto-added.

### Use Cases
Use Replatform if you want to:
- migrate with a time-crunch.
- leverage the benefits of the cloud without refactoring the app
migrate a complex on-premises app with minor tweaks for cloud benefits.

## 3) Repurchase("“drop and shop”")
### Definition of Repurchase
`Replacing the current system by purchasing a SaaS solution that meets the needs and requirements of the current application. Note: This can result in a data-migration and transformation project of its own.`

This is sometimes referred to as “drop and shop,” as it refers to a decision to move to another product.
Repurchasing (also called Replacing) is the strategy where the legacy application is fully replaced by a SaaS solution that provides the same or similar capabilities.
The migration effort heavily depends on the requirements and options of migrating (live) data. Some SaaS replacements for on-premise products from the same vendor offer an option to quickly migrate data with little effort or even automatically. Some providers offer analysis tools to assess the to-be-expected migration effort. However, this might not be the case when switching to a product of a different vendor or if the migration path has been interrupted due to neglected maintenance of the on-premise application.

The “repurpose” strategy is often applied when using a proprietary database platform or a proprietary product and moving to something else.
An example of this is moving from an on-premises email server to AWS Simple Email Service (SES). Another example is moving the organization’s CRM to Salesforce.

### Use Cases:
Use Repurchase if:
- You’re replacing software for standard functions like finance, accounting, CRM, HRM, ERP, email, CMS, etc.
- A legacy app is not compatible with the cloud.

## 4) Rehost(“lift-and-shift.”)
## Definition of Rehost
`Sometimes called ‘lift-and-shift’, this involves the replication of virtual machines from their current location into a cloud environment.`

Rehosting is commonly referred to as lift and shift.
This strategy is a widely chosen strategy due to the relatively low migration effort and it carries the least amount of risk.
It lifts servers and applications from the on-premises infrastructure and shifts them to copied as-is to a cloud infrastructure.
The most important benefit of this strategy is migration speed because no architectural refactoring needs to be done. 
Moreover, the migration can often be done automatically using a variety of lift-and-shift or so-called workload mobility tools.
There are significant benefits to running servers on the scalable, pay-as-you-go infrastructure of a cloud platform. 
It’s a relatively low-resistance migration strategy, and it’s a great strategy for working backward from a fixed constraint or a hard deadline.
However, the Rehosting strategy has a major drawback. Using this approach it is not possible to exploit the cloud's entire potential since the applications are not built in a cloud-native fashion. Simply rehosted applications are, compared to cloud-native applications, not decoupled from the operating system[2] and are usually much more difficult to scale. Experience shows that from a cost perspective Rehosting usually does not lead to any major advantage.

## Use Cases:
Use Rehost if you’re:
- only if speed is the most important factor.
- migrating a large-scale enterprise.
- new to the cloud.
- migrating off-the-shelf applications.
- migrating with a deadline.

## 5) Retain(“revisit” or do nothing.)
### Definition of Retain
`Keeping the application as-is, in its current environment.`

Retain (or Revisit) means that you do not migrate the application. Despite all the benefits of cloud technology, there are still reasons to retain some applications on-premises that are not ready to be migrated and will produce more benefits when kept on-premises, or you are not ready to prioritize an application that was recently upgraded and then make changes to it again.
For example, an application may be reaching its end-of-life soon, and you may not want to invest time and effort in migrating such an application. Retaining such applications as-is may be the right approach.

## Use Cases:
Use Retain if:
- You adopt a hybrid cloud model during migration.
- You’re heavily invested in on-premise applications.
- A legacy app is not compatible with the cloud and works well on-premise.
- You decide to revisit an app later.

## 6) Retire("Get rid of old one.")
### Definition of Retire
`Getting rid of an application.`

The Retire strategy means that an application is explicitly phased out.
This strategy involves identifying assets and services that can be turned off so the business can focus on services that are widely used and of immediate value.
If an application is considered not worth migrating to the cloud, it can either be eliminated or downsized. It allows you to explore all your applications in terms of their uses, dependencies, and cost to the company. It is a rather passive strategy as there is no migration.

## Use Cases:
Use Retire if:
- An app is redundant or obsolete.
- A legacy app is not compatible with the cloud and provides no productive value anymore.
- You decide to refactor or repurchase an app.

The following strategies are arranged in increasing order of complexity — this means that the time and cost required to enact the migration will be proportional to the increase, but will provide greater opportunity for optimization
**Retire(simples) < Retain < Rehost < Repurchase < Replatform < Re-architect/Refactor (most complex)**

## Best Practices for a Successful Cloud Migration

1. Know your IT portfolio inside out –the data, applications, and infrastructure
2. Design your migration strategy
3. Select the right partner for your cloud migration journey
4. Prepare your team and the existing IT environment for the transition
5. Leverage automated tools and managed services from cloud services providers wherever possible
6. Track and monitor the migration process continuously
7. Test and validate for optimization

### References

- https://aws.amazon.com/de/blogs/enterprise-strategy/6-strategies-for-migrating-applications-to-the-cloud/
- https://fs.hubspotusercontent00.net/hubfs/3001050/Poster/6R-Cloud-Migration-Decision-Guide.pdf

Connect with me at [Sagar-R-Ravkhande](https://www.linkedin.com/in/sagar-ravkhande/)