Soru

Zorluk: OrtaDeployment Strategy Design

A company uses an AWS CloudFormation template to manage a stateless web application. The application runs on Amazon EC2 instances within an Auto Scaling group (ASG) behind an Application Load Balancer (ALB). The ASG has a desired capacity of 8 instances. The company needs to deploy a new version of the application by updating the launch template with a new Amazon Machine Image (AMI). The deployment must maintain the full capacity of 8 instances at all times during the update to prevent performance issues. Which configuration of the `UpdatePolicy` attribute for the Auto Scaling group in the CloudFormation template meets this requirement?

  1. Configure an `AutoScalingRollingUpdate` policy with `MinInstancesInService` set to 8 and `MaxBatchSize` set to 2.Cevap
  2. B
    Configure an `AutoScalingRollingUpdate` policy with `MinInstancesInService` set to 6 and `MaxBatchSize` set to 2.
  3. C
    Configure an `AutoScalingRollingUpdate` policy with `MinInstancesInService` set to 8 and `MaxBatchSize` set to 0.
  4. D
    Configure an `AutoScalingRollingUpdate` policy with `MinInstancesInService` set to 0 and `MaxBatchSize` set to 8.

Cevap

Configure an `AutoScalingRollingUpdate` policy with `MinInstancesInService` set to 8 and `MaxBatchSize` set to 2.
Configuring the `AutoScalingRollingUpdate` policy with `MinInstancesInService` set to 8 and `MaxBatchSize` set to a positive integer (such as 2) ensures that CloudFormation launches new instances first before terminating old instances. Because the minimum instances in service is equal to the desired capacity, CloudFormation must temporarily scale out the Auto Scaling group to maintain 8 healthy instances throughout the rolling update.

Adım Adım Çözüm

1
Analyze the capacity constraints during the deployment.
The application must maintain its full serving capacity of 8 instances throughout the update process.
This is necessary to prevent performance degradation under peak load.
2
Determine the correct CloudFormation update policy parameters.
Set `MinInstancesInService` to 8 and `MaxBatchSize` to a positive integer.
Setting `MinInstancesInService` to the desired capacity (8) forces CloudFormation to launch new instances before terminating old ones. The `MaxBatchSize` controls how many instances are updated in each batch.

Anahtar Kavram

Using CloudFormation AutoScalingRollingUpdate policies to manage deployment capacity and prevent downtime.
Bu soruyu puanla