liveBook · Manning

HorizontalPodAutoscaler

A HorizontalPodAutoscaler is a Kubernetes API resource and controller that adjusts a workload’s replica count according to observed metrics and configured targets.

How 3 Manning books explain it

Kubernetes for Developers

A pod autoscaler is a Kubernetes controller that adjusts the number of workload replicas according to resource or application metrics.

How it is used
Automates Deployment replica counts as traffic or CPU-intensive work changes.
How deep it goes
Works through CPU-target configuration and load testing, then extends to external metrics without detailing Ingress setup.
Examples
Uses a pi-calculating HTTP endpoint, Apache Bench load, an external RPS metric, and CPU-intensive worker Pods.
What you can do after
Operate/configure it with an HPA manifest and observe replica changes using kubectl commands.

Read how Kubernetes for Developers explains HorizontalPodAutoscaler →

LLMs in Production

A horizontal pod autoscaler is a Kubernetes controller that adjusts an application's pod replica count according to observed metrics.

How it is used
Adjusts an application's pod replicas to match observed CPU or memory demand, supporting both scale-up protection and cost-saving scale-down.
How deep it goes
Explains native CPU and memory scaling, then identifies GPU-based scaling as a custom-metrics setup requiring additional services.
Examples
Uses CPU and memory for basic scaling and GPU utilization as an LLM-serving custom metric.
What you can do after
Evaluate whether native CPU and memory metrics suffice or custom GPU metrics are needed for scaling.

Read how LLMs in Production explains HorizontalPodAutoscaler →

Server-Side WebAssembly

The Horizontal Pod Autoscaler is a Kubernetes controller that adjusts a workload's replica count according to observed resource utilization or other metrics.

How it is used
Scales Spin applications in Kubernetes according to CPU and memory demand, reusing Kubernetes-native orchestration.
How deep it goes
Implements application creation, load generation, registry publishing, manifest scaffolding, monitoring, and observed replica changes.
Examples
Uses a recursive Fibonacci /load route, concurrent oha traffic, kubectl get hpa, and deployment events showing replicas scaling to ten.
What you can do after
Operate/configure HPA for a Spin application using Spin kube scaffolding and kubectl.

Read how Server-Side WebAssembly explains HorizontalPodAutoscaler →

Related concepts

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.