DOP-C02 · Question #308
A DevOps engineer needs to configure a blue/green deployment for an existing three-tier application. The application runs on Amazon EC2 instances and uses an Amazon RDS database. The EC2 instances…
The correct answer is B. Use an AWS CLI command to update the ALB to send traffic to the green environments target. In a blue/green deployment, you have two separate environments (blue and green) running different versions of your application. The goal is to switch traffic from the current (blue) version to the new (green) version all at once. The ALB target groups allow you to switch…
Question
A DevOps engineer needs to configure a blue/green deployment for an existing three-tier application. The application runs on Amazon EC2 instances and uses an Amazon RDS database. The EC2 instances run behind an Application Load Balancer (ALB) and are in an Auto Scaling group. The DevOps engineer has created launch templates, Auto Scaling groups, and ALB target groups for the blue environment and the green environment. Each target group specifies which application version, blue or green, will be loaded on the EC2 instances. An Amazon Route 53 The deployment must shift traffic all at once from the blue environment to the green environment. Which solution will meet these requirements?
Options
- AStarta rolling restart of the Auto Scaling group for the green environment to deploy the new
- BUse an AWS CLI command to update the ALB to send traffic to the green environments target
- CUpdate the launch template to deploy the green environment's application version to the blue
- DStarta rolling restart of the Auto Scaling group for the green environment to deploy the new
How the community answered
(29 responses)- A3% (1)
- B76% (22)
- C14% (4)
- D7% (2)
Explanation
In a blue/green deployment, you have two separate environments (blue and green) running different versions of your application. The goal is to switch traffic from the current (blue) version to the new (green) version all at once. The ALB target groups allow you to switch traffic between the blue and green environments. By using an AWS CLI command to update the ALB's configuration to send traffic to the green environment's target group, you ensure that all traffic is directed to the new version at once. After updating the ALB to route traffic to the green environment, you can initiate a rolling restart of the EC2 instances in the green Auto Scaling group to deploy the new application version to the green instances. This ensures that the instances running the new version are properly cycled into This approach ensures zero downtime because the traffic is shifted to the green environment, and once that's done, the green environment's EC2 instances can be updated with the new version in a controlled way. The blue environment remains untouched until traffic is fully shifted, providing an easy rollback path if needed. By updating the ALB target group first and then performing a rolling restart of the green environment's EC2 instances, you ensure a smooth traffic shift and seamless deployment.
Topics
Community Discussion
No community discussion yet for this question.