Inference autoscaling

Also known as: GPU autoscaling

On this page 7

Inference autoscaling is the automatic adjustment of the number of model serving replicas and the accelerators behind them in response to changing request load, so that latency targets are met without paying for idle hardware. In AI infrastructure, it is also called GPU autoscaling, because the scarce and expensive resource being scaled is usually the GPU rather than CPU or memory.

Autoscaling for model inference differs sharply from scaling ordinary web services. Replicas take tens of seconds to several minutes to start because model weights must be loaded into accelerator memory, a single GPU can serve many concurrent requests through continuous batching, and load is often measured in tokens rather than requests. Good autoscaling policies account for all three effects.

How inference autoscaling works

An autoscaler runs a control loop that observes metrics, compares them with targets and changes the desired replica count. A typical loop evaluates every 10 to 60 seconds, computes a new target from the ratio of observed load to per-replica capacity, and applies stabilization windows so that short spikes do not cause rapid oscillation.

The control loop usually works at two levels. Replica scaling adds or removes copies of the inference server, while node scaling provisions or releases the GPU machines that host them. Node provisioning is the slower step, so a replica request may wait several minutes when the cluster has no spare GPU capacity.

The table below lists the stages that determine how quickly a new replica begins serving traffic.

StageTypical durationMain driver
Node provisioning1 to 10 minutesCloud capacity and machine boot time
Container image pull10 seconds to several minutesImage size, often many gigabytes
Weight loading10 seconds to several minutesModel size and storage bandwidth
Engine warm-upSeconds to about a minuteKernel compilation and graph capture
Readiness checkA few secondsHealth probe interval
Stages of a scale-up event

The sum of these stages is the model cold start, and it is the main reason inference autoscaling must react earlier than conventional autoscaling. Teams reduce it with cached images, local weight storage and prewarmed nodes.

Scaling signals and metrics

Choosing the right signal is the most consequential design decision. GPU utilization is a poor signal on its own, because a GPU can report high utilization while still having room for more batched requests, or low utilization while memory for the KV cache is exhausted.

SignalStrengthWeakness
Queue depthDirectly reflects unmet demandReacts only after requests wait
Concurrent requests per replicaSimple and engine-independentIgnores prompt and output length
Tokens per secondTracks real computational loadRequires engine-level metrics
Time to first tokenMatches user-perceived latencyLags behind the cause of slowdowns
KV cache usageShows memory pressure earlyEngine-specific and nonlinear
GPU utilizationEasy to collectWeak correlation with headroom
Common autoscaling signals for model serving

Mature deployments often combine a leading signal, such as queue depth or KV cache usage, with a latency guardrail such as the 95th-percentile time to first token. The leading signal triggers early scale-up, while the guardrail catches cases the capacity model misjudges.

Scaling strategies and their trade-offs

Autoscaling strategies differ in when they act and how much capacity they keep in reserve. Reactive scaling responds to current metrics, scheduled scaling follows known daily patterns, and predictive scaling forecasts demand from history. Most production systems combine them.

StrategyBest suited toMain risk
Reactive scalingUnpredictable but gradual loadLatency breaches during cold starts
Scheduled scalingStrong daily or weekly cyclesWaste when patterns change
Predictive scalingLarge services with long historyForecast errors on unusual events
Scale to zeroRarely used models and test endpointsVery slow first response
Warm poolLatency-critical endpointsPaying for idle reserved GPUs
Inference autoscaling strategies compared

Scale-down deserves as much care as scale-up. Removing a replica must drain in-flight requests, which can take minutes for long generations, and aggressive scale-down creates thrashing, in which the system repeatedly releases and reacquires GPUs that may not be available again.

Inference autoscaling in the serving stack

Autoscaling interacts with several other AI infrastructure components. The load balancer or AI gateway must route new requests only to ready replicas, model routing may shift traffic between model sizes before new hardware is added, and provisioned throughput contracts can cap how far a service is allowed to scale.

  • Serverless inference platforms hide autoscaling behind a per-token or per-second price.
  • Disaggregated serving scales prefill and decode pools independently, since they have different bottlenecks.
  • Multi-LoRA serving lets one replica host many adapters, which reduces the number of separate deployments to scale.
  • Batch inference jobs can absorb spare capacity, letting interactive traffic reclaim GPUs during peaks.

Because GPUs are scarce, autoscaling is often limited by quota and availability rather than by policy. Teams therefore reserve a baseline of capacity and scale only the variable portion on demand.

Common mistakes and how to avoid them

Most autoscaling failures come from mismatched signals or unrealistic timing assumptions. The following table lists frequent symptoms and their usual fixes.

SymptomLikely causeFix
Latency spikes at every peakCold start longer than ramp-upRaise minimum replicas or prewarm
Replica count oscillatesShort stabilization windowLengthen scale-down delay
High cost at nightMinimum replicas set too highUse scheduled scale-down
Scaling never triggersScaling on GPU utilization onlyAdd queue or token metrics
Requests fail during scale-downNo graceful drainingExtend termination grace period
Troubleshooting inference autoscaling

Load testing with realistic prompt and output lengths is the most reliable way to calibrate per-replica capacity, because synthetic short requests overstate how many users a single GPU can serve.

The simple explanation

An AI service needs powerful chips to answer questions. Those chips are expensive. Leaving many of them switched on at quiet times wastes money. Too few at busy times makes everyone wait.

Inference autoscaling turns chips on and off as demand changes. Think of a supermarket that opens more checkout lanes when queues grow. The catch is that each new lane takes a few minutes to open. A good system opens lanes before the queue gets long, not after.

How it is used in practice

A company runs a customer support assistant on a mid-sized language model. Traffic is low overnight, rises sharply at 9 a.m. and peaks at roughly eight times the overnight level after lunch. Each replica uses one GPU and comfortably handles about 40 concurrent conversations, and a new replica needs about three minutes to become ready.

The platform team sets a minimum of two replicas, scales on concurrent requests per replica with a target of 30, and adds a scheduled rule that raises the minimum to eight replicas at 8:45 a.m. on weekdays. A guardrail adds capacity whenever the 95th-percentile time to first token exceeds 1.5 seconds. The result is stable morning latency and a GPU bill substantially lower than running peak capacity around the clock.