Request Queuing Strategies for LLM Performance Optimization
Key point
This proposes introducing fair scheduling at the API server layer to prevent specific users from monopolizing requests.
Details
Inference engines like vLLM or HuggingFace TGI use a single queue by default. This causes a problem where, if a specific 'heavy user' sends a large volume of requests, the queue becomes occupied, blocking other users' requests from being processed.
To solve this, we propose a structure that places a separate API Server (LLM-Server) in front of the inference engine. By creating an independent queue per user and scheduling requests via a Round-robin method, Fair Scheduling becomes possible, ensuring fairness before requests are passed to the inference engine.
Furthermore, the following optimization approaches can be considered:
- Processing time-based priority: A method that prioritizes shorter requests by considering the generation length of the request
- KV-cache-aware routing: A method that maximizes cache hit rate by batching based on similarity between requests (e.g., NVIDIA Dynamo, AIBrix)
- Utilizing priority queues: A method that assigns high priority to interactive services such as real-time chat, and low priority to batch tasks such as bulk code review
This summary was generated automatically by AI. Check the original for the author's claims and context. Copyright belongs to the original author.
Our guide explains how the AI works. Report summary errors, attribution issues, or removal requests via Contact.