AI Glossary / Data engineering and architecture / Intermediate
Autoscaling, vertical
Definition
Vertical autoscaling automatically adjusts the resources assigned to an individual workload instance, such as its CPU or memory allocation. It increases or decreases the size of instances according to supported policies and observations, rather than primarily changing how many instances run. The mechanism and whether changes require a restart depend on the platform.
What it means
A workload that struggles with a small memory allocation might need a larger allocation per instance. Adding more copies of the same undersized instance may leave every copy unable to complete its task. Vertical scaling addresses the size of that individual execution environment.
Autoscaling means a controller makes or recommends these adjustments automatically under defined rules. Manually replacing a small virtual machine with a larger one is vertical scaling, but not by itself vertical autoscaling.
More resources are not always the answer. A memory leak, inefficient query or external-service delay can persist after resizing. The aim is an appropriate, measured allocation.
How it works
The system gathers resource-use information and estimates a suitable allocation. Depending on the implementation, it may produce recommendations, apply new values during instance creation or update existing workloads through a supported resizing process.
In Kubernetes terminology, resource requests and limits have distinct roles. Requests influence scheduling and reserved capacity assumptions; limits constrain usage. A vertical autoscaling policy may control requests, limits or both, according to its configuration and supported behavior. Increasing a request is not identical to increasing a hard memory limit.
The platform needs enough suitable underlying capacity to honor the change. A larger requested workload may require rescheduling or infrastructure changes. Resizing can also cause disruption in some modes, so restart behavior and availability constraints matter.
A policy should set meaningful bounds and use representative observations. Short histories may miss periodic peaks. Combining vertical and horizontal controllers requires care when both react to related metrics, because changing per-instance resources can alter the signals used to decide replica counts.
Three practical examples
- A report-generation worker receives a larger memory allocation after representative workloads show that its current allocation is insufficient.
- A development service has oversized CPU requests reduced through a controlled rightsizing process after its usage pattern is understood.
- An AI preprocessing job is assigned more memory per worker when individual input batches cannot fit, while the team separately reviews batch size and algorithmic efficiency.
Think of it this way
Think of replacing a small workbench with a larger one so a person can handle a bigger assembly. Each worker gains space.
The analogy is limited. A larger bench does not make every task faster, and replacing it may interrupt work. Computing resources also differ: more memory addresses a different constraint from more CPU. A resizing decision should identify the actual shortage instead of treating every resource as interchangeable capacity.
Worked example
Requests and limits
Consider an invented container with a memory request of 2 GiB and a memory limit of 4 GiB. A tested job needs a peak of 5 GiB for its current input size. Assume that exceeding the configured memory limit causes the workload to fail under the platform's enforcement behavior.
A policy that raises only the request to 3 GiB while leaving the 4 GiB limit unchanged has not removed that limit. The job can still fail when it needs 5 GiB. The team must understand which settings the controller actually changes.
Suppose testing supports a revised request and limit with sufficient headroom, subject to the platform's rules. The cluster must also have a suitable place to run the workload; declaring a larger value does not create physical memory.
Finally, a job whose memory use grows continuously across repeated identical tasks needs investigation. Increasing allocations may postpone a failure while leaving a leak or retained-state problem unresolved. This distinguishes legitimate needs from defective behavior.
Illustrative case study
A fictional analytics company enables automatic recommendations for nightly report workers. Most days are small, but the month-end run combines substantially more data. A recommendation based only on recent quiet days would underestimate the important peak.
The team reviews a complete business cycle and tests representative large reports. It chooses bounds, examines whether applying changes can restart workers and confirms how unfinished jobs resume. It also changes one report that unnecessarily loads an entire dataset when smaller batches would work.
Rightsizing combines workload knowledge with measurements. The controller can assist with allocation, but the business calendar, restart tolerance and program design remain part of the decision.
Common misconceptions and mistakes
- Vertical autoscaling adds more replicas. That is horizontal scaling; vertical scaling changes resources per instance.
- Raising a resource request always raises its limit. The controller's policy and platform semantics determine which values change.
- Resizing is always immediate and interruption-free. Some mechanisms or update modes require replacement, restart or rescheduling.
Business use
Vertical autoscaling can reduce wasted allocation and help workloads whose individual resource needs vary. It is useful when a single process needs a different memory or CPU allocation and replication alone does not address that need.
Set resource bounds, understand update modes and test the effect on availability. Review whether recommendations cover the full operating cycle and whether changes can be applied during a task. Track failures, completion times and cost rather than assuming lower reservations are always beneficial.
For AI systems, separate model memory, activation memory, batch size and other resource drivers before resizing. CPU or memory rightsizing does not automatically make a larger model fit on an accelerator. Confirm the supported resource types and the application's ability to use them effectively.
People also ask
Can vertical autoscaling make allocations smaller?
Yes. Rightsizing can reduce excessive allocation as well as increase insufficient allocation.
Does it work the same way on every platform?
No. Supported resources, policy modes and disruption behavior vary.
Can it be combined with horizontal autoscaling?
Sometimes, but their metrics and control behavior must be coordinated to avoid conflicting or misleading responses.
Check your understanding
A container has a 4 GiB memory limit. A controller changes only its memory request, while the task still needs 5 GiB. Has the limit problem necessarily been solved?
Answer: No. The unchanged limit can still prevent the task from completing. The team must check the actual request, limit and underlying capacity together.
Related terms
- Horizontal autoscaling
- rightsizing
- resource request
- resource limit
- memory working set
- rescheduling
- capacity planning
- workload metrics
Learn next
Read requests, limits and resize behavior for the platform you use. Follow one workload through a complete demand cycle, then compare a sizing recommendation with observed peaks and acceptable disruption.
More in Data engineering and architecture
- Automatic parallelization - Automatic parallelization is the transformation of a program so that suitable work can run concurrently without the programmer manually organizing every...
- Automatic vectorization - Automatic vectorization is a compiler optimization that converts suitable scalar operations into vector operations.
- Autoscaling, horizontal - Horizontal autoscaling automatically increases or decreases the number of running instances that share a workload.
- Availability zone - An availability zone is a cloud provider's designated group of one or more datacenters within a region, designed as a separate failure boundary.
- Backup - A backup is a retained copy of data, or a recoverable representation of it, created so information can be restored after loss, corruption, unwanted change...
- Barrier (computer science) - A barrier in concurrent computing is a synchronization point that coordinates a defined group of participants before they proceed.
Sources
Kubernetes, Vertical Pod Autoscaling: https://kubernetes.io/docs/concepts/workloads/autoscaling/vertical-pod-autoscale/. Primary documentation of recommendations, controlled resources, bounds and update behaviour.
Kubernetes, Autoscaling Workloads: https://kubernetes.io/docs/concepts/workloads/autoscaling/. Primary overview distinguishing scaling approaches.
Kubernetes, Resource metrics pipeline: https://kubernetes.io/docs/tasks/debug/debug-cluster/resource-metrics-pipeline/. Primary description of metrics used by autoscaling components. The memory and analytics cases are original illustrations.
Previous: Autoscaling, horizontal Next: Auxiliary