AWS Blue-Green Deployment Technique for Controlled Migration

Blue-Green Deployment Technique for AWS Auto Scaling Group and Load Balancer

Prev Question Next Question

Question

You have a web application composed of an Auto Scaling group of web servers behind a load balancer, and create a new AMI for each application version for deployment.

You have a new version to release, and you want to use the Blue-Green deployment technique to migrate users over in a controlled manner while the size of the fleet remains constant over a period of 6 hours, to ensure that the new version is performing well.

What option should you choose to enable this technique while being able to roll back easily? Choose 2 answers from the options given below.

Each answer presents part of the solution.

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

Answer - A and C.

The AWS documentation gives this example of a Blue Green deployment.

You can shift traffic all at once or you can do a weighted distribution.

With Amazon Route 53, you can define a percentage of traffic to go to the green environment and gradually update the weights until the green environment carries the full production traffic.

A weighted distribution provides the ability to perform canary analysis where a small percentage of production traffic is introduced to a new environment.

You can test the new code and monitor for errors, limiting the blast radius if any issues are encountered.

It also allows the green environment to scale out to support the full production load if you're using Elastic Load Balancing, for example.

For more information on Blue Green deployments, please refer to the below link:

https://d0.awsstatic.com/whitepapers/AWS_Blue_Green_Deployments.pdf
‘Amazon Route 53
DNS Endpoint

"AWS Region

(ive)

‘Amazon ROS.
Mult AZ.

Figure 3: Classie DNS-weighted distribution

To enable Blue-Green deployment technique while being able to roll back easily for the given scenario, we need to choose two answers from the options given below:

A. Create an Auto Scaling launch configuration with the new AMI to use the new launch configuration and to register instances with the new load balancer. D. Configure Elastic Load Balancing to vary the proportion of requests sent to instances running the two application versions.

Explanation: The Blue-Green deployment technique is a strategy that involves creating a new environment (Blue environment) with the updated version of the application alongside the existing environment (Green environment) that is currently serving traffic. The new version is gradually rolled out to a subset of users while monitoring the performance, and if there are any issues, the traffic can be redirected back to the previous version with minimal impact. Once the new version is verified to be working as expected, the rest of the users can be migrated to the new environment, and the old environment can be retired.

To enable Blue-Green deployment for the given scenario, we need to create a new Auto Scaling launch configuration with the new AMI that contains the updated version of the application. This new launch configuration can be used to launch instances into a new Auto Scaling group, which is associated with a new load balancer. This ensures that the new version of the application is deployed in a completely separate environment, allowing us to test it thoroughly before switching over all the traffic.

To manage the traffic between the two environments, we need to configure the Elastic Load Balancer to distribute the requests between instances running the two versions of the application. This can be achieved by configuring the load balancer with a weighted algorithm, which will vary the proportion of requests sent to instances running the two application versions. This will allow us to gradually migrate the traffic to the new environment while monitoring the performance and ensuring that the new version is performing well.

By choosing these two options, we can enable Blue-Green deployment for the web application, allowing us to safely test and deploy the new version of the application while minimizing any potential impact on the users. If any issues are encountered, we can easily roll back to the previous version by redirecting the traffic back to the old environment.