vLLM AsyncLLM.check_admission() source (max_num_queued_reqs / max_num_queued_tokens admission path)
Fields
sources/ops-vllm-async-llm-admissionNotes
Docstring quoted verbatim: 'Reject the request if it would exceed queue limits. Both limits return HTTP 503 (Service Unavailable) so that load balancers and client SDKs retry on a different instance.' Two limits exist. max_num_queued_reqs is an 'approximate global cap on the number of unfinished requests (waiting + running). A request with n > 1 counts as n slots.' max_num_queued_tokens is a 'TTFT QoS - cap on the total prompt tokens of requests still in prefill.' The docstring also states that get_num_queued_tokens 'uses prompt_len for all prefilling requests. Chunked prefill progress and prefix-cache hits are not subtracted because the scheduler num_computed_tokens and num_cached_tokens are only propagated to the API server after prefill completes. The overestimation is conservative - earlier rejection, preserving TTFT targets.' Rejection log lines are 'Request queue full - rejecting request %s (current=%d, n=%d, max=%d)' and 'Max queued tokens reached - rejecting request %s (current_tokens=%d, max=%d)', both at logger.info level, not warning.
Cross-references
This record references no other records.