liveBook · Manning

Scalability

As explained in LLMs in Production

Autoscaling is the automatic adjustment of computing resources or service instances in response to workload or capacity conditions.

An LLM service rarely receives a steady stream of requests. Daytime traffic may require more capacity than nighttime traffic, while a sudden burst can threaten the service. Autoscaling adjusts the number of service replicas as demand changes: scale up to protect performance and scale down to release resources and reduce cost. section 6.2.2

Choose a scaling signal that reflects the service’s needs:

  • For basic Kubernetes autoscaling, a horizontal pod autoscaler (HPA) increases or decreases replicas using CPU or memory usage. section 6.2.2
  • For LLM inference, CPU and memory alone may be insufficient. GPU utilization is a more relevant custom metric, but it requires additional tooling. section 6.2.2
Figure 6.7 Autoscaling based on a custom metric like GPU utilization requires several extra tools to work, including NVIDIA’s DCGM, a monitoring system like Prometheus Operator, and a custom metrics API like that provided by KEDA.
figure

The custom-metric path connects GPU utilization to autoscaling through NVIDIA DCGM, a monitoring system such as Prometheus Operator, and a custom metrics API such as KEDA’s. section 6.2.2

Scaling up helps prevent overload; scaling down is just as important to the business because idle replicas cost money. Neither happens usefully by default: an engineer must identify the service’s capacity needs and configure the scaling signals accordingly. section 6.2.2

How LLMs in Production covers it

How deep it goes
Explains replica adjustment through native HPA signals and identifies tools needed for GPU metrics, but does not show configuration steps here.
Examples
Uses daytime and nighttime demand, traffic bursts, and GPU utilization to illustrate when and how replica counts should change.
What you can do after
Evaluate/understand it as a reliability and cost measure, and distinguish native CPU-and-memory scaling from GPU-metric scaling for LLM services.
How it connects
Connects autoscaling to Kubernetes deployments, horizontal pod autoscalers, CPU and memory metrics, GPU utilization, and custom metrics APIs.

Also explained in

Compare how 27 books explain scalability →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of LLMs in Production. The section links point to the parts of the book it draws on.