How does target tracking autoscaling maintain a utilization goal?
Target tracking autoscaling is a policy where you choose a CloudWatch metric and target value, and AWS manages the alarms and capacity adjustments to add or remove resources. Like a thermostat adjusting heating or cooling to a set temperature, it can keep an EC2 Auto Scaling group’s average CPU utilization near 50%, for example. The target is a control point, not a promise that every measurement will match it exactly. ([AWS: target tracking for EC2](https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-scaling-target-tracking.html), [dynamic scaling policies](https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-scale-based-on-demand.html))
How does target tracking autoscaling maintain a utilization goal?
Target tracking autoscaling is a policy where you choose a CloudWatch metric and target value, and AWS manages the alarms and capacity adjustments to add or remove resources. Like a thermostat adjusting heating or cooling to a set temperature, it can keep an EC2 Auto Scaling group’s average CPU utilization near 50%, for example. The target is a control point, not a promise that every measurement will match it exactly. (AWS: target tracking for EC2, dynamic scaling policies)
How does target tracking work?
The policy takes a metric and a target value. AWS creates and manages associated CloudWatch alarms, then calculates how much capacity to add when the metric is above target or remove when it is below. While new capacity is getting ready, the policy uses the instance warmup setting to interpret metrics. Set warmup to reflect how long the application actually takes to become ready. Because capacity is discrete, adjustments are rounded to whole units, so observed values can move above or below the target.
Target tracking generally responds more quickly to scale out and more cautiously to scale in. It can delay removing an instance if doing so is likely to push the metric back above target. This matters especially in small groups, where one instance is a large share of capacity. Do not edit or delete the CloudWatch alarms created for the policy. (AWS: target tracking for EC2)
Which metrics work well?
A useful metric rises as the resource becomes busier and generally falls in proportion when capacity is added. For a web tier that distributes load across instances, average group CPU or requests per load-balancer target may be useful. A metric such as total request count that does not decline when capacity increases may not work for target tracking. Custom metrics must meet the same proportionality requirement. (AWS: target tracking metrics)
If a metric stops publishing, its alarm can enter INSUFFICIENT_DATA; scaling may wait for new data. Check that the metric is emitted continuously and consider collection frequency. A slow metric interval combined with long application startup can let performance degrade before new capacity is ready.
How should you choose the target and warmup?
The target balances efficiency against spare capacity. A higher target can reduce the normal instance count and cost, but leaves less room for sudden demand. A lower target preserves more headroom but can keep more capacity running. Leave a buffer for unexpected traffic and tune against real workload and service measurements.
Set warmup to the time a new instance needs after entering InService to finish application initialization and contribute meaningful metrics. If it is too short, an unready instance can be counted too early and delay further scaling; if too long, needed capacity can arrive late. Refine the value using deployment records and observed readiness times. (AWS: target tracking and instance warmup)
How do multiple policies interact?
An Auto Scaling group can have multiple target tracking policies if they use different metrics. For example, CPU and requests per target can reveal compute and traffic pressure. To prioritize availability, the group can scale out when any policy calls for more capacity, but it scales in only when all policies that allow scale-in are ready. Conflicting signals can therefore delay scale-in. (AWS: multiple target tracking policies)
You can disable scale-in for a target tracking policy and use a separate method to reduce capacity, but conflicting policies can cause repeated scaling changes. For predictable demand cycles, scheduled scaling can adjust the baseline while target tracking handles variation. Document which policy owns scale-in and how each policy’s minimum and maximum limits interact.
How do you set up and verify a policy?
Set minimum, maximum, and desired capacity first. Choose a metric with a clear relationship to group capacity, then set the target and warmup. Observe whether the group scales out as load rises and scales in safely after it falls. Do not edit the policy-managed CloudWatch alarms; review scaling activity records, metric graphs, and desired versus actual group capacity together. (AWS: create a target tracking policy)
Missing data, reaching maximum capacity, a slowly published metric, or an inaccurate warmup can block or delay response. If behavior looks wrong, inspect the activity history to see which policy requested which adjustment, then verify metric direction, units, and reporting interval before changing the target or limits.
Official documentation
[Target tracking for EC2 Auto Scaling](https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-scaling-target-tracking.html)
[Dynamic scaling for EC2 Auto Scaling](https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-scale-based-on-demand.html)
[Create a target tracking policy](https://docs.aws.amazon.com/autoscaling/ec2/userguide/policy_creating.html)