What Is Autoscaling and How Does It Work?

Ashish Dubey
Marketing Leader
Published:
October 23, 2026
Updated:
November 17, 2026

Autoscaling changes the amount of compute a service uses dynamically, according to its current load. As traffic increases, more resources are provisioned. When traffic falls, the resources are reduced.

Otherwise, you have to guess at sizing. If you size for your peak hour, you are overprovisioned all day long. If you size for the average, your service is overloaded at the slightest spike. Autoscaling eliminates that trade-off.

⚑ TL;DR
  • Autoscaling adds or removes compute automatically as demand changes, so you stop paying for idle capacity and stop falling over at peak.
  • It comes in three forms: scale out (more copies), scale up (bigger machines) and scale to zero (nothing running when idle).
  • For GPU and LLM workloads, scale on queue depth or in-flight requests, not CPU, and plan for slow cold starts.
Autoscaling adjusts compute capacity to match demand

How does autoscaling work?

Every autoscaler runs the same loop:

  1. Measure. It reads a signal such as request rate, CPU, GPU use or queue length.
  2. Compare. It checks the signal against a target you set, for example 70% CPU or 5 requests in flight per replica.
  3. Scale out. If demand is above target, it starts more instances.
  4. Scale in. If demand stays below target, it removes instances.
  5. Wait. A cooldown stops it from adding and removing capacity every few seconds.
How autoscaling works: measure, compare, scale out or in, cool down

The main part of the art lies in selecting the signal and the thresholds. Scaling too slowly causes noticeable lag in the middle of a load spike. An overly aggressive approach leads to wasted resources or thrashing.

Types of autoscaling

Teams usually combine these rather than picking one.

Scale out vs scale up vs scale to zero
TypeWhat changesGood forWatch out for
Scale out / in (horizontal)Number of replicasWeb apps, APIs, model inferenceNeeds a stateless service or shared state
Scale up / down (vertical)Size of each instanceMemory-hungry or single-threaded jobsOften needs a restart; has a hard ceiling
Scale to zeroReplicas drop to 0 when idleDev, staging and spiky or rare workloadsCold start on the first request
ScheduledCapacity changes at set timesPredictable daily or weekly peaksMisses unplanned spikes

Autoscaling in Kubernetes

Kubernetes distributes this work between a few components, since pod scaling and node scaling are two different problems.

Kubernetes toolWhat it scalesTypical trigger
Horizontal Pod Autoscaler (HPA)Pod replicasCPU, memory or custom metrics
Vertical Pod Autoscaler (VPA)CPU and memory requests per podObserved resource usage
Cluster Autoscaler or KarpenterNodes (the machines pods run on)Pods that cannot be scheduled
KEDAPod replicas, including down to zeroQueue length, events, Prometheus metrics

In Kubernetes, you use HPA for pod scaling, and Karpenter or Cluster Autoscaler to add nodes if pods have no place to be deployed. KEDA is the usual solution for event-based autoscaling or going down to zero.Autoscaling changes the amount of compute a service uses dynamically, according to its current load. As traffic increases, more resources are provisioned. When traffic falls, the resources are reduced.

Autoscaling for GPU and LLM workloads

AI inference breaks some of the habits that work for web apps.

  • CPU is the wrong signal. A GPU can be saturated while CPU looks idle. Scale on requests in flight, queue depth or tokens per second instead.
  • Cold starts are slow. A new replica may need a GPU node, a multi-gigabyte image pull and model weights loaded into memory. That can take minutes, so keep a warm minimum for latency-sensitive endpoints.
  • Capacity is scarce. GPUs of a given type are not always available on demand, so set a maximum and have a fallback plan.
  • Idle is expensive. This is where scale to zero pays off for dev, staging and rarely used models.

Autoscale GPU models without the YAML

TrueFoundry deploys models on Kubernetes in your own cloud and handles replicas, GPU nodes and scale-down for you.

Book a demo β†’

TrueFoundry runs model deployments on Kubernetes in your own cloud account. You set minimum and maximum replicas and the scaling behavior per deployment, and it takes care of the cluster underneath. See the AI Gateway for how traffic is routed across those deployments, and load balancing for how requests are spread across replicas.

Best practices

  • Scale on a metric that reflects real load for your workload, not the one that is easiest to read.
  • Set a minimum to protect latency and a maximum to protect your budget.
  • Use cooldowns so the system does not flap.
  • Pre-warm or keep a spare replica where cold starts hurt.
  • Load test to find where one replica tops out before you set targets.
  • Track scaling events and cost together, and tune the rules over time.
Model serving

Pay for GPUs only while they are working

See how teams run inference on their own infrastructure with autoscaling, scale to zero and cost visibility built in.

Related: scale to zero, load balancing and LLM cost optimization.

1. Lorem ipsum dolor sit amet
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,Β 
2. Lorem ipsum dolor sit amet
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,Β 
3. Lorem ipsum dolor sit amet
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,Β 
Table of Contents

Govern, Deploy and Trace AI in Your Own Infrastructure

Book a 30-min with our AI expert

Book a Demo

Frequently Asked Questions

What is autoscaling in simple terms?

It lets a service automatically add compute when demand rises and remove it when demand falls. You stay responsive during busy periods without paying for extra capacity when things are quiet.

What is the difference between scaling out and scaling up?

Scaling out adds more instances to share the load, the common approach for web and inference. Scaling up moves to bigger instances with more CPU, memory, or GPU for heavier individual jobs. Many systems use both.

How does autoscaling decide when to scale?

It monitors signals like request rate, CPU/GPU usage, or queue length and checks whether they cross the thresholds you set. When demand crosses a threshold it adds or removes capacity, with cooldowns to avoid scaling back and forth too fast.

How is autoscaling related to scale to zero?

Scale to zero is the extreme of scaling in: dropping to no instances when fully idle. Standard autoscaling normally keeps at least one running, while scale to zero pays nothing when idle at the cost of a cold start.

Why does autoscaling matter for GPUs?

Because GPUs are expensive, running a fixed number sized for peak wastes money off-peak, while too few fail under load. Autoscaling GPU services with demand balances performance and cost, which is central to affordable AI.

Grey wavy lines on white background, abstract wave pattern with multiple curved lines intersecting smoothly.

GenAI infra- simple, faster, cheaper

Trusted by Top Teams to Scale GenAI