Autoscaling Self-Hosted LLM Inference Replicas on GPUs

Last updated: November 29, 2026

Quick Overview

Design the autoscaling system for self-hosted LLM deployments on Kubernetes GPU nodes, including which signals to scale on, scale to zero for idle models, cold start mitigation, and how to keep latency SLOs during traffic spikes.

Truefoundry
ML System Design
Machine Learning Engineer
Truefoundry
November 29, 2026
Machine Learning Engineer
System Design Round
ML System Design
Hard

0

0

0 solved


Design the autoscaling system for self-hosted LLM deployments on Kubernetes GPU nodes, including which signals to scale on, scale to zero for idle models, cold start mitigation, and how to keep latency SLOs during traffic spikes.

TrueFoundry deploys open models with servers like vLLM onto customer GPU clusters, and GPU cost is the line item customers watch most. The interviewer wants to see that you know CPU utilization is the wrong signal for LLM serving, understand cold start costs from node provisioning and weight loading, and can reason about the trade-off between idle GPUs and SLO violations.

What the Interviewer Expects
  • Pick LLM-aware signals such as queue depth, running batch size or KV cache utilization
  • Separate pod autoscaling from node provisioning
  • Concrete cold start breakdown and mitigations
  • Scale-to-zero design with request buffering
  • Hysteresis and cooldowns to prevent flapping
  • Cost versus SLO trade-off made explicit
Key Topics to Cover
autoscaling
GPU serving
vLLM
cold start
KEDA
Kubernetes
How to Approach This
  1. Start by mapping the business objective to a concrete ML objective and metric.
  2. Cover the full pipeline: data collection, feature engineering, model selection, training, serving.
  3. Discuss online vs offline evaluation. Plan an A/B test to validate real-world impact.
  4. Address the serving latency budget and whether batch or real-time inference is needed.
  5. Think about the data flywheel: how user feedback improves the model over time.
Possible Follow-up Questions
  • How would spot GPUs fit in, and what happens on preemption?
  • How do you autoscale a model that needs tensor parallelism across 4 GPUs?
  • How would you share one GPU between several small LoRA adapters?
  • What metrics prove the autoscaler is working well?
Sharpen Your Skills on Codemia

Practice similar problems with our interactive workspace, get AI feedback, and track your progress.

Practice ML System Design Problems
Sample Answer
Requirements

Each deployment has a model, GPU type, min and max replicas and an SLO such as p95 time to first token under 1 s. Traffic is bursty and some internal models are idle most of the day. Goals: meet the S...

High-Level Design

Model servers export metrics (requests waiting, requests running, KV cache usage, tokens per second). A metrics pipeline (Prometheus) feeds a scaler (KEDA or a custom controller) that sets replica cou...


Submit Your Answer
Markdown supported

Related Questions