Question #721
A company hosts its application on Amazon EC2 instances within an Auto Scaling group, fronted by an Application Load Balancer (ALB). The domain api.company.com is routed to the ALB via Amazon Route 53. The company plans to deploy a new version of its application, requiring 15% of users to receive the updated version during testing. Users must consistently interact with the same version throughout the testing period.
How should the company implement this deployment while adhering to the requirements?
Create a second ALB and deploy the new version to EC2 instances in a new Auto Scaling group. Update the Route 53 record to use weighted routing with 15% traffic directed to the new ALB. Configure session stickiness on both ALBs.
Create a new target group for the ALB and deploy the updated version to EC2 instances in this target group. Configure the ALB listener rule to route 15% of traffic to the new target group. Enable target group stickiness on the ALB.
Modify the existing Auto Scaling group's launch template to include the new version. Use an instance refresh with a 15% minimum healthy percentage to gradually replace instances. Enable ALB connection draining.
Deploy the new version to a separate Auto Scaling group and register it with the ALB. Adjust the ALB's routing algorithm to weighted least connections with 15% weight assigned to the new group. Enable session stickiness on the ALB.
Explanation
Answer B is correct because:
1. Traffic Splitting: The ALB supports listener rules to route a percentage of traffic to different target groups. By creating a new target group for the updated version, 15% of traffic can be directed to it.
2. Consistency: Enabling target group stickiness on the ALB ensures users interact with the same version once routed, using cookies to maintain session affinity.
Why other options are incorrect:
- A: Using two ALBs with Route 53 weighted routing introduces complexity and does not guarantee session stickiness across ALBs.
- C: Instance refresh replaces instances gradually but cannot maintain two versions simultaneously in the same Auto Scaling group.
- D: Weighted least connections focuses on load distribution, not precise traffic percentages, and lacks built-in stickiness for version consistency.
Key Points:
- Use ALB target groups and listener rules for traffic splitting.
- Enable target group stickiness for session consistency.
- Avoid mixing versions in a single Auto Scaling group.
Answer
The correct answer is: B