What is the difference between target tracking, step and scheduled scaling in an Auto Scaling group?
Target tracking holds a metric near a value you set, like 50% CPU. Step scaling adds or removes capacity in sized steps based on alarm thresholds. Scheduled scaling changes capacity at set times for predictable load.
Explain it simply
Think of a restaurant during the IPL final. Target tracking is a manager who keeps every waiter busy at about the same level and adds staff as needed. Step scaling is a rule: if the queue crosses 10 people add 2 waiters, if it crosses 30 add 6. Scheduled scaling is calling extra staff in at 7 pm because you know the match starts then.
Example
Target tracking : "keep average CPU at 50%"
ASG creates and manages the alarms itself. Simplest to run.
Step scaling : CPU 60-70% -> +1 instance
CPU 70-85% -> +3 instances
CPU > 85% -> +5 instances
You define alarms and steps.
Scheduled : 09:00 Mon-Fri -> min 6
22:00 daily -> min 2AWS also offers predictive scaling, which learns daily and weekly patterns from history and scales ahead of time. Policies can be combined, for example a schedule to raise the minimum before a sale plus target tracking to react to actual load.
A cooldown or instance warm-up period stops the group from adding more instances before the new ones are ready.
What to say in the interview
"Target tracking is my default because I just state the target metric value. Step scaling gives finer control over how much to add at each threshold, and scheduled scaling covers known events. I often combine scheduled and target tracking."
Common mistakes
- Setting the target so low that the group never scales in and costs stay high.