For a new application, the DevOps team is implementing a blue/green deployment strategy.
For each new release, the application can be deployed via a CloudFormation stack, including resources such as Auto Scaling Group, Launch configuration, and Classic Load Balancer.
A weighted routing policy is configured in Route53
With Route53, a small percentage of traffic goes to the green environment, and the weights increase until the green environment carries the full production traffic.
However, which disadvantage may this approach have?
Click on the arrows to vote for the correct answer
A. B. C. D.Correct Answer - B.
To implement blue/green deployments in AWS, there are several methods.
For the details, check the document in.
https://d1.awsstatic.com/whitepapers/AWS_Blue_Green_Deployments.pdf.In this scenario, the deployment strategy is as below:
Option A is incorrect: On the contrary, DNS weighted routing in Route 53 is simple to implement for blue/green deployment.
Option B is CORRECT: This limitation is clearly indicated in the above link.
Older clients may take a long time until they use the new environment.
Option C is incorrect: Because for rollback, it is quite straightforward by switching back the weight to the old environment.
Option D is incorrect: Because a Network load balancer or application load balancer can also be used together with Route53 weighted routing.
The correct answer is B: DNS TTL decides how long clients cache query results. Certain sessions may still be tied to the previous environment to impact the speed to deploy a new environment or rollback.
Explanation:
Blue/green deployment is a release technique that deploys a new version of an application in parallel to the existing version. This allows testing the new version in a production-like environment before switching the traffic to it. In this approach, two identical environments are maintained, one is the existing production environment (blue), and the other is the new version (green). Once the green environment is tested and validated, the traffic can be switched from the blue environment to the green environment.
Route53 is a highly available and scalable DNS service offered by Amazon Web Services. It provides several routing policies to route traffic to different resources based on various conditions. One of the routing policies is the weighted routing policy, which allows traffic to be split across different resources based on the weights assigned to each resource. In this case, the weighted routing policy is used to split traffic between the blue and green environments.
One of the disadvantages of using the blue/green deployment strategy with the Route53 weighted routing policy is the DNS TTL. DNS TTL (Time-To-Live) is a setting that determines how long the DNS records can be cached by DNS resolvers. When a client makes a DNS query, the DNS resolver caches the result for the TTL period. If the same client makes another query within the TTL period, the DNS resolver returns the cached result instead of making a new query. This reduces the query load on the DNS servers and improves the response time for the clients.
In the blue/green deployment strategy, when the traffic is switched from the blue environment to the green environment, the DNS records for the application need to be updated to point to the new environment. However, since the DNS records are cached by the DNS resolvers, it may take some time for all the clients to receive the updated records. This can result in some clients still being directed to the old environment even after the traffic has been switched to the new environment. This can cause issues with session persistence, data consistency, and overall performance.
Therefore, the DNS TTL needs to be carefully managed to ensure that the clients receive the updated records in a timely manner. In addition, the blue/green deployment strategy should also have a rollback plan in case of issues with the new environment. The rollback plan should take into account the DNS TTL and ensure that the clients are redirected to the old environment quickly and without any issues.
Option A is incorrect because the weighted routing policy is not complicated to implement in a pipeline. It can be easily integrated with CI/CD pipelines to automate the deployment process.
Option C is incorrect because the weighted routing policy can be used for rolling back to the previous environment. The weights can be adjusted to direct the traffic back to the old environment.
Option D is incorrect because the Route53 weighted routing policy can be used with any type of load balancer, including Classic, Network, and Application Load Balancers. The load balancer is responsible for distributing the traffic to the instances in the target group based on the routing policy configured in the load balancer.