In recent times, there is an obsession to automate deployment process which helps to achieve high availability. There is a popular buzz word nowadays called blue-green deployment.
Main Objectives are 1) How to make application highly available by minimizing downtime 2) How to give good user experience to users.
There are many approaches to achieve this scenario and blue-green deployment is one of the popular approaches nowadays.
In simple English, We keep two environments for Production 1) Green 2) Blue.
Every new release of an application is deployed in the Green Environment. Keep the Stable deployment into Blue Environment. Configure router to forward requests to both the environment based on defined policy.
One everything seems fine, switch the router to forward requests to new release in Green Environment.
Another benefit is flexibility in the rollback mechanism. If new release is having any issue or not working properly then we can use Blue environment with previous stable release immediately and hence we can minimize the downtime without any major impact on user experience.
High availability is an approach to the application where infrastructure and architecture supports almost zero percent downtime over the application’s lifecycle to keep an application fully agile, functional, robust, and to audit high availability efficiently. DevOps approach in collaboration with cloud service model - PaaS, significantly increases high availability and fault tolerance, reliability, business agility, improved scalability, security, and compliance. Building flexibility in runtime environment by anticipating issues can result into automatic failover and effective way to achieve high availability.
Following are some of the representations of Blue Green Deployment (Please correct us if we have made any mistake):
- Create identical production environments called Blue (i.e. Active) and Green (i.e. Idle / pre-prod)
- Active environment serves all production traffic
- Deploy new release on Green environment and verify functionality before making it active
- Immediate rollback to working copy of application in case new release fails after activation
- It creates efficient feedback loops with stakeholders and customers, it becomes easy to regularly ship features without worrying about maintenance windows.
CloudFoundry uses blue-green deployment approach.
Labels: Automation, Cloud Computing, CloudFoundry, Devops