Home › Tracks › AI Infrastructure & Inference › Production Serving & Autoscaling
Week 10 concept
Production Serving & Autoscaling
Wrap a model in a service that holds an SLO: load balancing across replicas, GPU autoscaling, cold-start mitigation, and observability for tokens-per-second and time-to-first-token.
Bridges to Distributed Systems — load balancing, replication, and capacity planningBuilds on: Speculative Decoding & Latency Optimization
Study notes
Master this concept.
Production Serving & Autoscaling
What it is
Production serving is the process of wrapping a trained AI model in a scalable API service. Instead of running a model on a single machine, you deploy it across a cluster of servers (replicas) managed by a load balancer. This ensures that requests are distributed evenly and that the system can automatically add or remove GPU resources based on real-time demand.
Why it matters
Raw models are not products. In a real-world system, users expect consistent response times regardless of whether ten or ten thousand people are using the app. Without proper serving infrastructure, a sudden spike in traffic will crash the service, and inefficient resource allocation will lead to massive cloud computing bills.
Core concepts to master
- SLOs (Service Level Objectives): Defining the acceptable performance thresholds for the system, such as maximum latency or minimum uptime.
- Inference Metrics: Tracking Time-to-First-Token (TTFT) to measure perceived responsiveness and Tokens-Per-Second (TPS) to measure overall throughput.
- GPU Autoscaling: Dynamically adjusting the number of active GPU nodes to match the request volume.
- Cold-Start Mitigation: Strategies to handle the delay when a new replica is spun up and the large model weights must be loaded into GPU memory.
- Load Balancing: Distributing incoming traffic across multiple healthy replicas to prevent any single node from becoming a bottleneck.
Common mistakes
- Scaling on CPU metrics: Attempting to autoscale based on CPU usage rather than GPU memory or request queue depth, leading to unresponsive services.
- Ignoring TTFT: Focusing only on total generation time while ignoring the initial delay, which makes the AI feel sluggish to the end user.
- Over-provisioning: Keeping too many GPUs active during low-traffic periods, resulting in wasted expenditure.
Connection to the track
This concept sits at the end of the AI Infrastructure pipeline. Once a model is optimized (via quantization or pruning) and the inference engine is selected, production serving is the final layer that exposes that model to the world. It transforms a static mathematical artifact into a reliable, scalable piece of software.
Go to the source
Read, watch, and practice.
Free, world-class material chosen for this concept.