0

I have an ECS Service running a task definition. Whenever I push a new task definition out, I know there is some blue-green logic to drain the previous task before rerouting to the new task.

What happens if you push a new task definition but your cluster does not have enough resources to place a task? Does the current task remain running?

Also, is there an automated way to verify that my new task is now accessible, since it takes time to drain the previous task?

1 Answers1

0

What happens if you push a new task definition but your cluster does not have enough resources to place a task? Does the current task remain running?

This depends on how you define your service healthy thresholds. enter image description here

What this configuration says is:

  • Prefer to have 2 tasks running at any given time
  • If an update is required, allow 50% of desired to be drained off
  • If an update is required, allow 100% of desired to be deployed as additional capacity, and then drain off the other taks

The maximum setting here requires that you have available resources - if you don't, it will default back to the minimum.

Also, is there an automated way to verify that my new task is now accessible, since it takes time to drain the previous task?

If you're looking for an alarm that you can set in CloudWatch, I don't think that exists.

MrDuk
  • 815
  • 1
  • 10
  • 18