How to perform Blue/Green or Canary deployment for your legacy application

Gunardy
2 min readApr 2, 2022

Background

In general, the deployment for most legacy applications was still in-place deployment which requires lots of effort(including bring-up the applications takes around 30–45 minutes). And when the new features are introduced, the operation team has to deal with the critical problem(transaction failure, duplicated transactions in concurrent processes, or even poor system performance). I observed this situation in the past 10-years.

The challenges

So, is it possible to adopt another deployment strategy such as Blue/Green or Canary since they are introduced in the microservice world? The answer is yes but the most challenge you face is splitting the network traffic between the running version of the application and the new feature. This can be more simple when your application runs in the Kubernetes cluster by using a tool like istio. So, it is very challenging how to split the network traffic in the physical network.

The implementation plan

Here is the way how to do it when you decide to change deployment strategy to either Blue/Green or Canary deployment:

  1. Create a new environment for the new feature using VM. Using VM is cheaper than the physical. And you don’t need to match how many VM you created by referring to the number of server nodes in your Production.
  2. Improve your deployment pipeline to perform your deployment strategy. You improve it by creating a separate CI/CD pipeline on the deployment tool you used in the company to deploy your application.

Besides that, you need to reconsider your application rollout policy:

  1. Quarterly rollout(1–4 months). This gives time for your product/business team to test a new feature. And test should not only cover all their requirements but how it is integrated with the current functionality in your application.
  2. Cumulative rollout(6 months). You may consider this when you are okay with the delivery every 6 months. In this way, it delivers the collection of new features that are being tested within 6 months.

In the end, you reconsider not being too rush in announcing the new feature in public General Availability to your customer as it required some time to be integrated with your application. Focusing on the quality of your delivery, brought the greatest for your customer experience.

Hopefully, this article will give you some good perspective for your successful journey. Any constructive feedback from you is welcome here.

--

--

Gunardy

An old-timer Software Developer, Self Learner, and Google Cloud enthusiast