Target tracking
Definition
Target tracking computes the desired instance count from the current metric and its target, typically desired = ⌈running × current metric ÷ target⌉, within minimum and maximum limits.
In practice
It is the default policy in most autoscalers (AWS target tracking, the Kubernetes Horizontal Pod Autoscaler) because you state only a goal, such as 60% CPU or 100 requests per instance, and the formula does the rest. The target leaves headroom for the minutes it takes new instances to boot and warm up.
The formula assumes the metric scales linearly with load and falls as instances are added; CPU on a database-bound service or latency often does not. Scale out fast and scale in slowly with cooldowns or stabilisation windows to avoid flapping, and use scheduled or predictive scaling for known spikes that arrive faster than the loop reacts.
Example
Ten instances average 90% CPU against a 60% target, so the autoscaler sets ⌈10 × 90 ÷ 60⌉ = 15 instances.