GoodServe: Globally-coordinated Routing of Agentic LLM Inferences for High Goodput
Agentic applications consume LLM inferences as complete outputs: a code patch or database query is useful only after its last token arrives. Their performance is thus measured by end-to-end deadline satisfaction and goodput, the number of inferences completed within their deadlines. In heterogeneous GPU pools, existing greedy routers favor the fastest or least-loaded instance, often wasting powerful GPUs on requests that could meet their deadlines on weaker ones. Maximizing goodput instead requires globally coordinated routing, informed by uncertain output lengths and dynamic instance performance. We present GoodServe, a goodput-oriented routing system that addresses these challenges through a predict-and-rectify design. A task-gated mixture-of-experts predictor estimates request output lengths, while an EMA-smoothed black-box estimator tracks queuing delays and per-token speeds, accounting for prefix-cache reuse. A just-enough policy routes each request to the weakest instance capable of meeting its deadline and rejects requests that cannot finish on time. Periodic risk checks trigger migration of endangered requests using token IDs, at 7-15 times lower cost than KV-cache transfer. On a four-GPU heterogeneous testbed with three agentic benchmarks, GoodServe achieves the highest goodput across all evaluated SLO levels, improving over the best existing router by up to 31.0%. Its routing overhead remains 5 ms per request at 10,000 requests per second across 512 simulated instances.