ESC on EC2 environment with Capacity Provider.
I am using Capacity Provider in an ESC on EC2 environment and want to properly manage the number of EC2 instances when scaling in.
Rules are set in the ASG for the ESC task to scale out with the increase in ALB requests.
In this case, the number of EC2 instances is also increased.
The problem is when scaling in.
The number of EC2 instances remains increased even after the number of ESC tasks has been restored.
How can the number of EC2 instances be restored to the original number as well?
Example.
ESC task: 2
EC2 instances: 2
↓ Scale out
ESC task: 10
EC2 instances: 10
↓ Scale in
ESC task: 2
EC2 instances: 3 ← Why? I want to scale to 2
We thought it might be due to the ECS task allocation strategy and changed from spread to binpack, but this had no effect.
ktydisk is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.