In the latest episode of the Generative AI Podcast, hosts Arjun and Diya tackle a critical issue in large language model (LLM) serving: why round-robin load balancing fails in production. The core problem, they explain, is a hardware limit rather than a configuration choice. A single inference replica has a hard ceiling, meaning that no amount of clever routing can make a single GPU serve unlimited requests.
Arjun breaks down the mechanism: "With round-robin, you distribute requests evenly across replicas, but with LLMs, each replica recomputes the same work from scratch. If one replica is overloaded, others might be idle, yet they cannot help because they lack the context." This leads to poor resource utilization and increased latency.
Diya adds that the common wisdom—"round-robin is good enough, least-connections is over-engineering"—does not survive contact with LLMs. Instead, they advocate for a least-outstanding-requests algorithm, which dynamically routes to the replica with the fewest pending jobs.
A common trap, they warn, is autoscaling based on CPU metrics. Since LLM inference is GPU-bound, CPU-based autoscaling fails to capture true demand, leading to outages.
The episode contrasts LLM serving with traditional web serving: while web requests are stateless and can be load-balanced easily, LLM requests involve large state (KV caches) that must be replicated or shared, making naive round-robin inefficient.
Listeners are directed to the full written lesson at datarekha.com for more details.