Soru

Zorluk: OrtaDeployment Strategies and Execution

A SysOps administrator is configuring AWS CodeDeploy to deploy updates to a web application running on an Auto Scaling group of Amazon EC2 instances behind an Application Load Balancer. The deployment process must maintain full application capacity during the deployment to avoid performance degradation, automatically revert to the previous version with the minimum possible recovery time if application-specific Amazon CloudWatch alarms are triggered, and ensure that active user sessions connected to the old version are not abruptly disconnected. Which configuration should the administrator select to meet these requirements?

  1. Configure a blue/green deployment with an automatic rollback configuration for CloudWatch alarms, and set a deregistration delay on the load balancer's target group.Cevap
  2. B
    Configure an in-place deployment with an automatic rollback configuration for CloudWatch alarms, and set a deregistration delay on the load balancer's target group.
  3. C
    Configure a blue/green deployment with a manual rollback action, and configure connection draining on the Auto Scaling group lifecycle hooks.
  4. D
    Configure an in-place deployment with a custom deployment configuration of CodeDeployDefault.AllAtOnce, and enable automatic rollback when a deployment fails.

Cevap

Configure a blue/green deployment with an automatic rollback configuration for CloudWatch alarms, and set a deregistration delay on the load balancer's target group.
The correct configuration is a blue/green deployment combined with automatic rollback and load balancer deregistration delay. A blue/green deployment maintains full capacity by provisioning a new auto scaling group (the green environment) alongside the existing one (the blue environment). If a CloudWatch alarm triggers a rollback, CodeDeploy can instantly redirect traffic back to the original instances, resulting in the shortest recovery time. The deregistration delay (connection draining) ensures that existing sessions on the old instances are allowed to complete before the instances are terminated.

Adım Adım Çözüm

1
Analyze the capacity requirement during deployment.
Determine that a blue/green deployment strategy is required because it provisions a separate fleet (green) to deploy the new version, maintaining 100% capacity on the existing fleet (blue) until the update is successful.
In-place deployments take instances out of service or update them directly, reducing active capacity or risking downtime.
2
Evaluate the rollback speed and automation requirements.
Configure automatic rollback based on CloudWatch alarms. A blue/green deployment allows CodeDeploy to instantly route traffic back to the original instances, minimizing rollback recovery time.
Rolling back an in-place deployment requires running a new deployment of the previous code revision, which is slow and violates the minimum recovery time requirement.
3
Address the requirement to prevent abrupt disconnection of active user sessions.
Configure a deregistration delay (connection draining) on the load balancer's target group.
Deregistration delay allows existing connections to complete their requests before CodeDeploy terminates the original instances.

Anahtar Kavram

AWS CodeDeploy deployment strategies (In-place vs Blue/Green), rollback behaviors, and Load Balancer integration settings.
Bu soruyu puanla