Azure Migration Strategies

Introduction

 
Hosting on the cloud is a popular choice today. A lot of applications that are being developed are hosted on the cloud so as to leverage the modern hosting capabilities it offers. No upfront cost is needed for buying and maintaining Infrastructure. This option is cheap. You just pay for what you use. And the infrastructure can be commissioned in minutes and can be disposed of anytime when it is no longer  needed.
 
Because of the features offered by cloud hosting, a lot of existing applications are being migrated to the cloud as well. However this is not that easy. The strategy has to be planned very carefully and executed smoothly for things to go well post migration.
 
Azure has an edge over others in the world of cloud computing because of the wide range of services it provides and its ease of use. It is a highly secured environment and is compliant with industry and government standards around the globe. Based on the greater degree of flexibility it offers and ease of adoption, lots of applications are being migrated to Azure.
 
Here in this article we will discuss the major strategies that have to be adopted while migrating an application to the Azure cloud.
 

Cloud Agnostic or Cloud Native on Azure

 
While deciding the strategy it is vital to decide whether you need to take the Cloud Agnostic route or a Cloud Native route.
 
It is good to be cloud agnostic. A Cloud Agnostic approach offers the application not just the ability to shift from on premises to a particular cloud but also offers the capability to migrate across cloud vendors. This is a cost effective approach and offers the capability to exit from a cloud service provider any time and move to a new one. There is no dependency of the application with the cloud vendor. It is free to be migrated to another cloud vendor as-is without any code change. Here the application is optimized to sit on the cloud.
 
However there are lot of good offerings specific to a cloud vendor that the application would like to leverage. If the application leverages anything specific to a particular cloud vendor then it gets hosted as a cloud native solution. The application builds a tight dependency with the cloud service provider by consuming a service specific to it. However it is good to be cloud native at times so as to consume the best offering, being provided exclusively by a specific cloud provider.
 
Azure Migration Strategies
 
While migrating applications to the cloud, the applications are tweaked a bit or some minor changes are incorporated so that they are optimized to run on the cloud. Once the applications are cloud optimized and are migrated then the difficult part of the migration journey is achieved and they can be further enhanced to adopt all the cloud benefits. A cloud agnostic approach should be kept in mind while making the application cloud optimized. Cloud native features require rebuilding from scratch and hence should be avoided while taking a cloud optimized path. The cloud optimized path is the fastest and most economical way to move the application to the cloud.
 
Based on the decision of whether to be cloud optimized or cloud native, the next set of choices can be made in order to adopt the right strategy.
 

Cloud Optimized Strategies for Azure Migration

 
When it comes to migrating applications using cloud optimized strategies then there are three approaches available:
  1. Rehost
  2. Refactor
  3. Rearchitect
Let us discuss each of these strategies in detail.
 

Rehost

 
A Rehost strategy can be adopted whenever you just need to host the existing application to Azure with minimum efforts. No code change is needed here and the application is migrated as-is. Usually such an option is an Infrastructure as a Service approach and is a perfect example of the Lift and Shift strategy. The migration is quick as no additional code change is needed here. This route is taken whenever there is a skill gap needed to enhance the application to make it cloud ready or the application has to get into the cloud Infrastructure from existing datacenter quickly pertaining to a strict deadline.
 
This strategy is usually taken when the company needs to offload existing On-Premises servers and move the application to the cloud as an Infrastructure as a Service solution. Here the company gets  greater control on cloud Infrastructure for the hosted application. Usually a virtual machine is commissioned for this and the application is moved from local IIS or any other web host to the IIS or a web host on the Virtual Machine. The same kind of environment as in on-premises is replicated on the Azure Virtual Machine and the application is configured and hosted as-is on the Virtual Machine as it was hosted on the on-premises server. If the database being used on-premises is a SQL Server then it is recommended to use Azure SQL Database Managed Instances. Any other databases not available by default on Azure Infrastructure should be installed and configured on a Virtual Machine.
 
Azure Migration Strategies
 

Refactor

 
A Refactor strategy is adopted whenever there is a need to fit the application to the cloud with little or not many changes made. The application here should be at minimum ready to be hosted as a pure cloud application. All necessary changes to make the application cloud ready are made. Usually such applications are hosted as Platform as a Service solution. Usually the application is modified as needed so that it can be hosted on Azure App Service fitting into the one of the hosting plans. The On-Premises application is modified to make it cloud portable.
 
If SQL server database is used then Azure SQL Database Managed Instance can be used, else the database can be configured on an Azure Virtual Machine.
 
There can also be a case where there are portability issues while adopting the Rehost strategy. In such a case minimum changes can be made to the application and can be hosted as Infrastructure as a Service solution as well.
 
The basic idea here is to incorporate minimum changes so as to be able to repackage the application and port it smoothly to the cloud.
 
Azure Migration Strategies
 

Rearchitect

 
The cloud is much more than a hosting environment. It offers basic characteristics like Availability, Reliability, Fault Tolerance and much more. With Refactor and Rehost options you will be able to leverage the cloud benefits at a minimum. However to unleash the cloud goodness to the maximum extent, the application has to be modified at architecture level so that it can fit into the cloud services like Azure Kubernetes Services or Azure Service Fabric. In such cases a Rearchitect strategy is adopted.
With existing or slightly more investments in the application, all cloud advantages like scalability, reliability, and availability are available in this option. Modern DevOps practices can be adopted with ease. A lot of good Azure Services can be used in such an approach. The entire migration is kept cost effective.
 
Azure Migration Strategies
 

Cloud Native Strategies for Azure Migration

 
When it comes to migrating application using Cloud Native Strategies then there is one approach available.
  1. Rebuild
Let us discuss this strategy in detail.
 

Rebuild

 
In this approach the application is built again from scratch. The main goal here is to use the Cloud Native features provided by the Cloud provider to the maximum extent. And at the same time this approach takes time as the application is rebuilt and involves investment as lot of proof of concept has to be worked on to see what all cloud native features should be adopted.
 
The application can be moved to modern Serverless services like Azure Logic Apps, Azure Event Grid, Azure Functions or many more. Azure Cosmos DB can be used as Database solution. This has to be a Platform as a Service or a Serverless approach. New age applications like Artificial Intelligence, Blockchain, or Internet of Things applications can be built using Azure specific offerings in these areas. DevOps process is much more mature and smooth here as things gel up perfectly with the cloud service provider.
 
Azure Migration Strategies
 

Winding Up

 
The decision tree is demonstrated in the below figure.
 
Azure Migration Strategies
 
The most crucial thing is from where to start and how to approach. In this article we explored all the necessary steps in this regard. Migrating from on-premise to the cloud is cool and is the need of the hour, but at the same time it should be properly planned and executed in a smooth fashion so as not to get post migration surprises. It is always advisable to get into the cloud first using a cloud optimized approach and then bring in all cloud features once the application is in the cloud. To sum up, moving to the cloud is a smarter choice than just being stuck with on-premises servers;  so you can be in the modern age,  enjoying  all cloud features like Scalability, Reliability, Fault Tolerance and many more.