Soru

Zorluk: Çok zorDeployment Strategy Design

An enterprise is designing a deployment strategy for a stateless API service running on Amazon EC2 instances in Auto Scaling groups behind Application Load Balancers across 33 AWS Regions. The deployment must achieve zero downtime, restrict the blast radius by deploying sequentially across regions, and perform a gradual traffic shift (starting with 10%10\% of traffic) within each region to monitor for application errors. The deployment must automatically roll back immediately if the error rate or p99p99 latency exceeds defined thresholds, and the rollout to subsequent regions must be halted. Which deployment architecture meets these requirements with the least operational overhead?

  1. Deploy updates using AWS CodePipeline to orchestrate a sequential deployment across Regions. In each Region stage, configure AWS CodeDeploy to perform a blue/green deployment. CodeDeploy shifts 10%10\% of traffic to the green Auto Scaling group using an Application Load Balancer, monitors CloudWatch alarms, and automatically rolls back traffic to the blue group if thresholds are breached.Cevap
  2. B
    Deploy updates using AWS CodePipeline to update AWS CloudFormation StackSets sequentially across Regions. Configure the StackSet template to perform an in-place rolling update of the Auto Scaling group using an AutoScalingRollingUpdate policy. If CloudWatch alarms are triggered during the update, roll back the CloudFormation StackSet to the previous version.
  3. C
    Deploy updates using AWS CodePipeline to trigger a sequential deployment. For each Region, update the launch template of the Auto Scaling group and execute an Instance Refresh. Use an AWS Lambda function to update Route 53 weighted routing policies, routing 10%10\% of DNS queries to a new secondary Auto Scaling group, and revert the weights if CloudWatch alarms are triggered.
  4. D
    Deploy updates using AWS CodePipeline to update AWS Elastic Beanstalk environments sequentially. In each Region, configure the deployment policy to Immutable. If CloudWatch alarms are triggered or the deployment fails during the bake period, Elastic Beanstalk automatically rolls back the environment by deleting the temporary Auto Scaling group.

Cevap

Deploy updates using AWS CodePipeline to orchestrate a sequential deployment across Regions. In each Region stage, configure AWS CodeDeploy to perform a blue/green deployment. CodeDeploy shifts traffic to the green Auto Scaling group using an Application Load Balancer, monitors CloudWatch alarms, and automatically rolls back traffic to the blue group if thresholds are breached.
The correct strategy uses AWS CodePipeline for sequential cross-region orchestration and AWS CodeDeploy to execute blue/green deployments. CodeDeploy handles traffic shifting at the Application Load Balancer level, which allows a precise 10%10\% traffic cutover and immediate rollback to the active blue group if CloudWatch alarms (tracking error rate and p99p99 latency) are triggered, ensuring zero downtime.

Adım Adım Çözüm

1
Define the pipeline structure for multi-region coordination and blast radius control.
AWS CodePipeline is chosen to deploy sequentially across the target Regions, ensuring that a failure in an early Region stops the pipeline.
Sequential regional stages isolate the deployment's blast radius to a single Region at a time.
2
Select the traffic shifting mechanism for fine-grained application testing.
AWS CodeDeploy is selected to perform blue/green deployments using Application Load Balancer target group weights to shift 10%10\% of traffic, rather than using Route 53 DNS weights.
Load-balancer-level traffic shifting bypasses client-side DNS caching limitations, enabling precise and immediate traffic distribution.
3
Configure the automated rollback triggers and execution flow.
CloudWatch alarms monitoring error rate and latency are integrated directly into the CodeDeploy deployment. If triggered, CodeDeploy immediately shifts 100%100\% of traffic back to the original blue Auto Scaling group and terminates the green instances.
Keeping the original Auto Scaling group active during the bake period allows for instant rollback with zero downtime.

Anahtar Kavram

AWS CodeDeploy Blue/Green deployments for EC2 utilize Application Load Balancer target group traffic shifting to enable precise, immediate traffic redirection and instant rollback, bypassing DNS caching limitations associated with Route 53 weighted routing.
Bu soruyu puanla