ECS Cluster Auto Scaling

Introduction

CAS Representation

How is this metric calculated ?

CapacityProviderReservation = M / N * 100

Let’s see CapacityProviderReservation in action

During the 1st load test (CapacityProviderReservation 90%)

(1) Initial state

(2a) 1st stage: Alarm is triggered and Service Autoscaling needs to add more tasks

(2b) New instance created

(3a) 4th stage: Alarm keeps staying in ALARM state and Service Autoscaling needs to add more tasks

(3b) New instance created

After the load test 1

During the 2nd load test (CapacityProviderReservation 50%)

(1) Initial state

(2a) 2nd stage: Alarm is triggered and Service Autoscaling needs to add more tasks

(2b) New instances created

(3a) 4th stage: Alarm keeps staying in ALARM state and Service Autoscaling needs to add more tasks

(3b) New instances created

And now the behaviour with other options…

CAS option: Protected from scale-in option

ECS Service Option: Task Placement set to spread

And finally…

aws ecs describe-container-instances --region {your_region} --cluster {your_cluster} --container-instances {your_container_instances}

Issues during CAS setup:

Lead Backend / SRE Engineer

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store