Releasing complex applications with Zero downtime is always difficult to achieve. People always come with a solution to face such problems. So, Blue-Green Deployment is one of the strategies to deploy an application without having Downtime. In this article, we will discuss What is Blue-Green Deployment and How It is helping us with Zero Downtime Release.
Blue and Green mean two identical Production environments. Which mean, we will have two identical production environment and among those, one will serve the end-user at a time.
- Say, we have Production Environment-1 called as Blue and Production Environment-2 called as Green. And All the End User traffic will be routed to Green Environment which is in Version-1. As shown in the bellow figure.
- Then, We Upgrade the Blue environment to Version-2. and perform all sanity and Production Testing to check the installation is correct or not
- After that, once after the Production Testing is passed in the Blue environment, we slowly route all the user to the Blue environment which is installed with Version 2.
- Finally, we will install the same packages to Green Environment and again we route End Users back to Green Environment.
Advantages of Blue-Green Deployment
- Testing in Production: Testing in Production is always challenging but it will reduce the High risk of some bugs which missed from stage or QA environment. When we are in the Blue environment, we can test without disturbing the End User.
- Easy Rollback: Without Blue Green Process, the Rollback process is very difficult as we have active users after the critical upgrade install. So, the Blue-Green approach allows us to safely rollback when we are in the Blue environment. This process can be done without disturbing any end-user.
- No Down Time: With the Blue-Green Deployment, End-user is always severed with anyone (Either Blue or Green Environment) of the environment even at the time of Upgrade Deployment. So, there is no Downtime in the Blue-Green Deployment.
Challenges in Blue-Green Deployment
- Delivery Pipeline: As we have two identical production environments, Automating the deployment process creating the Delivery pipeline is difficult. Mainly because of the trigger point between Blue and Green, which means, It is difficult to automate when we should start routing to which environment. But with proper Delivery Pipeline, this can be solved.
- Blue Green Dashboard: Since we have two identical production environments and different versions of the application installed, Having insight with the packages and code installed at any point of time in the deployment is required to decide when to trigger to where. So, Blue Green Dashboard is highly recommended for a smooth release.
- Cost and Effort: We are having two sets of environments and both are running all the time with the same state of the environment. So, the Cost of Production is doubled and the Effort of managing/maintaining the Production is increased.
Green Deployment strategy will help in terms of Zero Downtime and Easy Rollback. Even though we have some Challenges and drawbacks, we can easily handle it by implementing the proper DevOps on it. In our upcoming article, we will discuss on the Delivery pipeline for the this Deployment and Dashboard implementation for Blue-Green Deployment Insight. Stay tuned and subscribe DigitalVarys for more articles and study materials on DevOps, Agile, DevSecOps and App Development.
Experienced DevSecOps Practitioner, Tech Blogger, Expertise in Designing Solutions in Public and Private Cloud. Opensource Community Contributor.