3

If a service is using the rolling update (ECS) deployment type, the minimum healthy percent represents a lower limit on the number of tasks in a service that must remain in the RUNNING state during a deployment, as a percentage of the desired number of tasks (rounded up to the nearest integer). The parameter also applies while any container instances are in the DRAINING state if the service contains tasks using the EC2 launch type. This parameter enables you to deploy without using additional cluster capacity. For example, if your service has a desired number of four tasks and a minimum healthy percent of 50%, the scheduler may stop two existing tasks to free up cluster capacity before starting two new tasks. Tasks for services that do not use a load balancer are considered healthy if they are in the RUNNING state. Tasks for services that do use a load balancer are considered healthy if they are in the RUNNING state and they are reported as healthy by the load balancer. The default value for minimum healthy percent is 100%.

(https://stackoverflow.com/a/40741816/433570, https://docs.aws.amazon.com/AmazonECS/latest/developerguide/update-service.html)

So If I have single instance running, If I have minimum percentage below 50%, the running task will be killed before creating new task.
If I have minimum percentage above or equal to 50% , new deployment won't be deployed, because it is stuck at having 1 instance.

I have to temporarily increase the desired instance count to 2 and do a deployement if I want to deploy a task without service downtime. correct?

eugene
  • 39,839
  • 68
  • 255
  • 489
  • if there is no dynamic port it will not launch the new task and it will say port occupied. if there is space is first instance then you will not sure which instance it will launch the new task. so to run one container per instance then you need to set memory maximum to isntance size memory so it will keep one container per instance – Adiii Sep 24 '19 at 09:32

0 Answers0