TL;DR
This paper introduces a unified framework to solve the "cache affinity vs. load balancing" tug-of-war in multi-LLM serving systems. By replacing standard LRU eviction with a provably robust randomized policy (RLT) and using an online learning-based router (LBGR), the authors achieve up to a 14× reduction in latency and a 77% boost in throughput over state-of-the-art systems.
The Dual Challenge of LLM Serving
Large Language Model (LLM) inference is computationally expensive. To speed things up, systems use KV (Key-Value) caching, which stores the intermediate states of previously processed text (prefixes) so they don't have to be recomputed for future queries.
However, two major challenges arise in real-world, multi-model serving environments:
- The Eviction Fragility: Memory is limited. When the cache is full, the system must decide which tokens to "evict." The industry standard, Least Recently Used (LRU), is surprisingly fragile. In dynamic or adversarial scenarios, LRU can accidentally evict exactly what the next query needs, leading to massive "cache misses" and high latency.
- The Routing Conflict: In a system with multiple LLM workers, you face a dilemma. If you send all similar queries to one worker to maximize cache hits (Cache Affinity), that worker gets overwhelmed while others sit idle. If you spread queries evenly (Load Balancing), you lose the benefits of the cache.
Existing solutions rely on static heuristics that fail to adapt to changing query patterns or the true "congestion" of the system.
A Joint Perspective: RLT and LBGR
The authors propose a "joint perspective" that tackles both eviction and routing through two new algorithms:
1. RLT (Randomized Leaf Token Eviction)
Instead of the deterministic LRU, RLT uses a randomized "marking" strategy. It keeps track of a set of "marked" tokens that have been recently accessed. When the cache is full and a new token arrives, RLT evicts an unmarked leaf token chosen uniformly at random.
- Why it works: Mathematically, this randomization breaks the vulnerability to "worst-case" query sequences. The authors prove that RLT achieves a competitive ratio of $O(\log n)$, which is exponentially better than LRU’s $O(n)$ in adversarial settings.
2. LBGR (Learning-Based Greedy Routing)
LBGR acts as a smart traffic controller. For every incoming query, it estimates the end-to-end latency for every available LLM worker and picks the one with the lowest predicted time. The prediction model includes:
- Service Time Estimation: Uses a global tracker to guess how many tokens will "hit" the cache.
- Queue Load Estimation: Tracks the work currently assigned to a worker, applying an exponential decay to account for the fact that the worker is constantly finishing tasks.
- Online Residual Regression: A lightweight linear model that learns "on the fly" to correct for environmental noise and system biases that simple math can't capture.
Key Insights
- LRU is a Bottleneck: The paper provides a formal mathematical proof showing that LRU-based eviction is fundamentally limited in LLM serving. Its performance can degrade linearly with the size of the cache when query patterns are unfavorable.
- The Power of Randomness: By simply injecting controlled randomness into the eviction process, the system becomes significantly more robust against "bursty" or repetitive query patterns that typically cause cache thrashing.
- Queueing is Temporal: Most routers just count the number of pending queries. LBGR recognizes that queue load is a decaying value over time, leading to much more accurate routing decisions.
- Joint Optimization: Caching and routing are deeply coupled. Improving one without the other leads to diminishing returns; the "joint perspective" is what unlocks massive performance gains.
Experimental Results
The researchers evaluated their system across four diverse benchmarks (GSP, ShareGPT, UltraChat, Loogle, and custom adversarial sets) using models like Llama-3.1 and Mixtral 8x7B.
The improvements over state-of-the-art methods (like SGLang's cache-aware routing) are dramatic:
- Latency: Up to 11.96× reduction in median end-to-end latency.
- TTFT (Time-to-First-Token): Up to 14.06× reduction, critical for user-facing applications where the "wait time" for the first word is the most noticeable lag.
- Cache Hit Rate: Improved by up to 6.92× in challenging scenarios.
- Throughput: A 77.4% increase in the number of requests the system can handle per second.
- Efficiency: The RLT and LBGR algorithms add negligible overhead—only about 2ms per query.
Limitations and Future Work
- Text-Only Focus: The current implementation and evaluation are limited to text-based KV caches. Extending this to multi-modal models (images/video) remains for future work.
- Single-Domain Scale: Experiments were conducted with up to 10 workers. While this covers many enterprise use cases, the behavior in massive, geo-distributed clusters hasn't been tested.
- Estimation Noise: The global radix tree used for hit-rate estimation operates at the character level to save time, which can occasionally lead to slight inaccuracies compared to token-level tracking.
Summary updated