Posted by Jatin Gupta | Last Updated: 14-Jan-19
What is blue/green deployment?
Blue/green deployment is a kind of unchanging arrangement used to convey programming refreshes with less hazard by making two separate situations, blue and green. Blue refers to the currently running variant of the application and green is the new version of the application you will send.
This sort of sending gives you a chance to test includes in the green condition without affecting the current running form of your application. When you're fulfilled that the green adaptation is working appropriately, you can
bitby bit reroute the movement from the old blue condition to the new green condition by adjusting DNS. By following this strategy, you can refresh and move back highlights with almost zero downtime.
This capacity to rapidly move activity back to the as yet working blue condition is one of the key advantages of blue/green arrangements. With blue/green, you ought to have the capacity to move back to the blue condition whenever amid the sending procedure. This limits downtime to the time it takes to understand there's an issue in the green condition and move the activity back to the blue condition. Moreover, the effect of the blackout is constrained to the bit of activity heading off to the green condition, not all movement. In the event that the shoot sweep of arrangement blunders is diminished, so is the general sending hazard.
Containers make it easier
Generally, blue/green deployments were not frequently used to convey programming on-premises in view of the expense and intricacy related with provisioning and dealing with numerous situations. Rather, applications were overhauled set up.
Containers can facilitate the reception of blue/green deployment since they're effectively bundled and carry on reliably as they're moved between conditions. This consistency comes halfway from their unchanging nature. To change the arrangement of a holder, refresh its Dockerfile and reconstruct and re-deploy the container other than upgrading the software in place
Completely Managed Updates with Amazon ECS
Amazon Elastic Container Service (ECS) performs moving updates when you refresh a current Amazon ECS service. A moving update includes supplanting the current running adaptation of the compartment with the most recent variant.
When you refresh your service's task definition with the most recent form of your container image, Amazon ECS naturally begins supplanting the old variant of your container with the most recent adaptation. Amid a deployment, Amazon ECS drains connection from the current running rendition and registers your new containers with the Application Load Balancer.
A target group is a logical construct that helps you to run various services behind the common Application Load Balancer. This is because every target group has its very own listener.
With this arrangement, you can run the two conditions in parallel until the point that you're prepared to cut over to the green version of your service to be deployed. You can likewise do things, for example, limiting access to the green adaptation to testers on your interior organization
When you're prepared to replace the old blue service with the new green deployed service, call the ModifyListener API task to swap the listener's guidelines for the target rules. The change occurs inside a couple of moments