0

I am trying to setup a scaling policy in ECS Cluster, so that EC2 instance that make up ECS cluster and task runnning in ECS Service could scale up and down based on the scalling policy i specified. I had created 2 cloud watch alarm for that, which will check CPUUtilization resource.

1) HIGH_CPU_Usage : Whenever >= 80 %
2) LOW_CPU_Usage : Whenever <= 40 %
  • Configured ECS auto scaling to scale up task when "HIGH_CPU_Usage" triggered.
  • Configured ECS auto scaling to scale down task when "LOW_CPU_Usage" triggered.
  • Configured EC2 Auto scaling to scale up EC2 instance when "HIGH_CPU_Usage" triggered.
  • Configured EC2 Auto scaling to scale down EC2 instance when "LOW_CPU_Usage" triggered.

Can any on please help me out to understand solution for below points .

1) When "HIGH_CPU_Usage" alarm trigger, will both EC2 instance and ECS task scale up event occur simultaneously. Will the task scale up event wait for the ec2 instance scale up event to complete.

2) If EC2 instance scale up event take more time to complete and in same time ECS task scale up event find no available resource in the cluster, what will happen.

3) If CPU load spiking up and down, Instance scale up and scale down occur multiple time and it will cause huge billing . Is there any way to solve these

Sreeraju V
  • 381
  • 3
  • 16
  • 1
    1. Basically the same time 2. ECS will wait for available resources before it can do the deployment, the additional tasks will stay "pending" 3. Adjust your alarm rules so that short spikes do not trigger scaling events – jordanm Aug 02 '19 at 21:14
  • Thanks for your responce. Is there any cut-off time period, ECS will stay "pending" status till EC2 resource make available. – Sreeraju V Aug 05 '19 at 05:41

0 Answers0