Soru

Zorluk: KolayDeployment Strategies

A developer is updating a microservice hosted on Amazon ECS. Due to budget constraints, the developer cannot provision any additional container instances in the ECS cluster. The application is currently running at its desired task count and must remain at least 50% operational during the deployment. Which deployment configuration for minimum healthy percent and maximum percent will allow the deployment to succeed under these constraints?

  1. minimumHealthyPercent set to 50, and maximumPercent set to 100Cevap
  2. B
    minimumHealthyPercent set to 100, and maximumPercent set to 200
  3. C
    minimumHealthyPercent set to 100, and maximumPercent set to 100
  4. D
    minimumHealthyPercent set to 0, and maximumPercent set to 100

Cevap

Setting the minimumHealthyPercent to 50 and maximumPercent to 100 allows Amazon ECS to deploy the updates within the existing cluster capacity while keeping the application partially available.
The configuration specifying minimumHealthyPercent as 50 and maximumPercent as 100 ensures that ECS can terminate up to half of the running tasks before launching new ones. This satisfies the requirement to keep the application 50% operational while ensuring that the task count never exceeds 100% of the desired limit, avoiding the need for additional instances.

Adım Adım Çözüm

1
Determine the resource availability limit.
The maximum percent must be set to 100.
Since no additional container instances can be provisioned in the cluster, the deployment cannot scale out. The total number of tasks running at any time must not exceed the desired task count.
2
Determine the minimum service availability requirement.
The minimum healthy percent must be set to 50.
The service is required to remain at least 50% operational during the update, meaning at least 50% of the desired task count must be healthy and running at all times.
3
Combine the parameters to define the deployment configuration.
Select the configuration with minimumHealthyPercent at 50 and maximumPercent at 100.
This allows ECS to stop 50% of the tasks first, then start 50% of the new tasks, proceeding iteratively without exceeding the resource capacity or dropping below the availability threshold.

Anahtar Kavram

Amazon ECS Rolling Update Parameters (minimumHealthyPercent and maximumPercent)
Tahmini Süre:1m 0s
Bu soruyu puanla