CodePark/ questions / Availability, scaling, IaC & cost
START PRACTICINGPRACTICE
Backend question · Cloud & AWS › Availability, scaling, IaC & cost

You want an ECS service to add or remove tasks automatically so that average CPU stays around 50%. Which scaling policy type fits best?

Target tracking scaling

"Target tracking scaling" works like a thermostat. You choose a metric, such as average CPU, and a target value, such as 50%. It creates and manages the alarms that add tasks (scale out) and remove tasks (scale in).

"Scheduled scaling" is wrong here. It changes capacity at set times, whatever the real load is. So it cannot keep a metric near a target.