Soru

Zorluk: ZorDeployment Strategy Design

An enterprise is designing a deployment strategy for a high-throughput financial transaction processing application that uses a proprietary TCP-based protocol. The application runs on Amazon EC2 instances within an Auto Scaling group and is exposed via a Network Load Balancer (NLB) in the `us-east-1` Region.

The company needs to implement a canary deployment strategy for new releases. The strategy must route 5%5\% of the production traffic to the new version (Green) while keeping 95%95\% on the current version (Blue). If the new version meets key performance indicators (KPIs) over a 22-hour monitoring window, all traffic must be routed to it. If any anomalies are detected, the deployment must support an instantaneous rollback to the Blue version without waiting for DNS records to expire, as client applications are known to ignore DNS Time to Live (TTL) settings and cache IP addresses indefinitely.

Which deployment strategy meets these requirements with the least operational complexity?

  1. Deploy the new version of the application in a separate Auto Scaling group behind a new NLB. Configure an AWS Global Accelerator accelerator with a single endpoint group in `us-east-1`. Add both the Blue NLB and the Green NLB as endpoints in the endpoint group. Set the endpoint weight for the Blue NLB to 9595 and the Green NLB to 55. After the 22-hour monitoring window, update the weights to 00 for Blue and 255255 for Green. If a rollback is needed, immediately set the Green NLB weight to 00.Cevap
  2. B
    Create a second target group containing the new EC2 instances. Configure the existing NLB listener to use weighted target group routing, directing 95%95\% of the traffic to the original target group and 5%5\% to the new target group. After the 22-hour monitoring window, update the listener to route 100%100\% of the traffic to the new target group. If a rollback is needed, revert the listener routing weights.
  3. C
    Deploy the new version in a separate Auto Scaling group behind a new NLB. In Amazon Route 53, create two weighted alias records pointing to the DNS names of the Blue and Green NLBs, with weights of 9595 and 55 respectively. After the 22-hour monitoring window, change the weights to 00 and 100100. If a rollback is needed, set the Green NLB weight to 00.
  4. D
    Create an AWS CodeDeploy deployment group for the EC2 Auto Scaling group. Configure the deployment to use a CodeDeploy blue/green deployment with an NLB. Select the predefined `CodeDeployDefault.OneAtATime` traffic shifting configuration, and configure a custom deployment lifecycle hook to test 5%5\% of the traffic over 22 hours before shifting the remaining traffic.

Cevap

Deploy the new version in a separate Auto Scaling group behind a new NLB, and use AWS Global Accelerator to route traffic between the Blue and Green NLBs by adjusting their endpoint weights. This avoids DNS caching issues and provides instantaneous rollback capabilities.
The correct strategy uses AWS Global Accelerator to distribute traffic between the Blue and Green Network Load Balancers. Since Global Accelerator uses Anycast routing to direct traffic through static IP addresses, changes to the endpoint weights take effect within seconds. This allows the enterprise to split TCP traffic dynamically and roll back instantaneously, bypassing the client-side DNS caching issues that would plague a Route 53 weighted routing solution.

Adım Adım Çözüm

1
Analyze the application protocol and load balancer requirements.
The application uses a custom TCP-based protocol, which dictates the use of a Network Load Balancer (NLB) rather than an Application Load Balancer (ALB). ALB-only features, such as weighted target group routing, cannot be used.
Choosing the correct load balancer type is critical to ensuring compatibility with the proprietary TCP-based protocol.
2
Evaluate the DNS caching constraints and potential solutions.
Using Route 53 weighted routing is disqualified because client applications ignore DNS TTLs and cache IP addresses. A solution operating at the IP routing layer is required.
Instantaneous rollback requires that client traffic shifting does not rely on client-side DNS cache expiration.
3
Assess AWS Global Accelerator as the traffic routing mechanism.
AWS Global Accelerator provides static IP addresses and Anycast routing. By adding both NLBs as endpoints in an endpoint group and adjusting their weights, traffic can be shifted immediately at the edge without DNS propagation delays.
This meets the constraint of zero-downtime, gradual canary routing and instantaneous rollback capability for TCP workloads.

Anahtar Kavram

AWS Global Accelerator weighted endpoints for TCP canary deployments
Bu soruyu puanla