In a traditional approach to application deployment, engineers fix the failed deployments by deploying an older stable version of the same application. Although, this approach works but there are a lot of shortcomings with it. The rollback is a cumbersome process and takes more than usual time which results in a longer downtime period of the application deployed. A new approach which is a lot more agile in nature, scalable and automated to have the deployment seamlessly done is Blue/Green deployment.
Methodology
Blue/green deployments provide near zero downtime release and easy rollback capabilities. The fundamental idea behind blue/green deployment is to shift traffic between two identical environments that are running different versions of your application. The blue environment represents the current application version serving production traffic. In parallel, the green environment is staged running a different version of your application. After the green environment is ready and tested, production traffic is redirected from blue to green.
Benefits
This deployment is possible with almost all the cloud providers by using various services which they offer. Some services offered by different cloud providers to set up a blue/green deployment are:
DNS Service
DNS services runs on a global network of DNS servers providing customers with added features, such as routing based on health checks, geography, and latency. DNS is a classic approach to blue/green deployments, allowing administrators to direct traffic by simply updating DNS records in the hosted zone.
Load Balancing
Another common approach to routing traffic for a blue/green deployment is through the use of load balancing technologies. Elastic Load Balancing distributes incoming application traffic across designated Elastic Compute Cloud instances.
Auto Scaling
Auto Scaling helps maintain application availability and lets customers scale instance capacity up or down automatically according to defined conditions. Both Auto Scaling termination policies and Standby state enable blue/green deployment.
Application deployment has associated risks. But the advent of cloud computing, deployment and automation frameworks, and new deployment techniques, such as blue/green, help mitigate risks, such as human error, process, downtime, and rollback capability.