Soru

Zorluk: ZorDeployment Strategies

A developer is designing a deployment strategy for a high-traffic microservice running on Amazon ECS (Fargate). The service has a desired count of 8 tasks. Due to strict vCPU and memory service quotas in the AWS region, the deployment process must never run more than the 8 desired tasks at any point during the update. Additionally, to handle baseline traffic and prevent downtime, at least 4 healthy tasks must remain in service throughout the deployment. Which deployment strategy and configuration should the developer choose to meet these requirements?

  1. An ECS rolling update with the minimum healthy percent set to 50% and the maximum percent set to 100%.Cevap
  2. B
    An ECS rolling update with the minimum healthy percent set to 100% and the maximum percent set to 150%.
  3. C
    An AWS CodeDeploy Blue/Green deployment with a Canary traffic-shifting configuration.
  4. D
    An ECS rolling update with the minimum healthy percent set to 0% and the maximum percent set to 100%.

Cevap

An ECS rolling update with the minimum healthy percent set to 50% and the maximum percent set to 100%.
The correct strategy is a rolling update with the minimum healthy percent set to 50% and the maximum percent set to 100%. In Amazon ECS, setting the minimum healthy percent to 50% with a desired task count of 8 guarantees that at least 4 tasks (8 * 0.50) will remain running and healthy at all times during the deployment, preventing downtime. Setting the maximum percent to 100% restricts the total number of tasks to 8 (8 * 1.00), ensuring the service never exceeds the desired task count and respects the strict resource quotas. ECS will stop 4 old tasks first to make room under the 100% limit, start 4 new tasks, wait for them to become healthy, and then repeat the process for the remaining tasks.

Adım Adım Çözüm

1
Analyze the constraints given in the scenario.
Desired count is 8 tasks. Maximum allowed concurrent tasks is 8 (100% of desired). Minimum required healthy tasks is 4 (50% of desired).
This establishes the bounds for the maximum capacity percent and the minimum healthy capacity percent.
2
Evaluate the rolling update configuration options against the constraints.
A minimum healthy percent of 50% (4 tasks) and a maximum percent of 100% (8 tasks) matches the capacity bounds exactly.
ECS calculates these percentages relative to the desired task count to determine how many tasks can be stopped and started during a deployment.
3
Evaluate the Blue/Green deployment option.
CodeDeploy Blue/Green deployments for ECS spin up a full replacement task set (8 additional tasks, totaling 16), which violates the resource quota constraint.
Blue/Green deployment requires duplicate resource capacity during the cutover phase.

Anahtar Kavram

Configuring rolling update parameters (minimumHealthyPercent and maximumPercent) in Amazon ECS to control deployment capacity limits and maintain service availability.
Tahmini Süre:2m 0s
Bu soruyu puanla