[Feature] Add request overload control with HTTP 429 queue timeout eviction - #8
Open
Jackie2049 wants to merge 1 commit into
Open
[Feature] Add request overload control with HTTP 429 queue timeout eviction#8Jackie2049 wants to merge 1 commit into
Jackie2049 wants to merge 1 commit into
Conversation
Jackie2049
force-pushed
the
feature/overload-control-429
branch
from
June 4, 2026 05:31
2703e60 to
42823da
Compare
Adds a configurable max_waiting_time that evicts requests waiting too long in the scheduler queue, returning HTTP 429 to clients. Changes: - SchedulerConfig: add max_waiting_time field (default: 0 = disabled) - RequestStatus: add FINISHED_OVERLOAD status - FinishReason: add OVERLOAD reason - Scheduler: evict stale requests before each scheduling cycle - HTTP layer: return 429 for overloaded requests via OverloadError exception, registered in chat/completion/responses/streaming paths The feature is off by default and activated by setting --max-waiting-time > 0 in SchedulerConfig. Closes: #3 Co-authored-by: Boundless <ruihang_wu@163.com>
Jackie2049
force-pushed
the
feature/overload-control-429
branch
from
June 4, 2026 05:43
42823da to
3591356
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #3
Adds a configurable
max_waiting_timethat evicts requests waiting too long in the scheduler queue, returning HTTP 429 Too Many Requests to clients.Problem
In production vLLM deployments, there is no mechanism to handle request queue overload:
Changes
Core (4 files)
vllm/v1/request.py: AddFINISHED_OVERLOADtoRequestStatusenum + mapping toFinishReason.OVERLOADvllm/v1/engine/__init__.py: AddOVERLOAD = 5toFinishReasonenum +"overload"toFINISH_REASON_STRINGSvllm/config/scheduler.py: Addmax_waiting_time: float = 0field toSchedulerConfigvllm/v1/core/sched/scheduler.py: Add eviction logic at the start ofschedule()— scans waiting queues and finishes expired requestsHTTP Layer (6 files)
vllm/entrypoints/openai/engine/protocol.py: AddOverloadErrorexception withHTTP 429statusvllm/entrypoints/openai/engine/serving.py: Extend_raise_if_error()to handle"overload"finish_reason + update streaming error handlervllm/entrypoints/openai/api_server.py: RegisterOverloadErrorexception handlervllm/entrypoints/openai/chat_completion/serving.py: CatchOverloadErrorin streaming pathvllm/entrypoints/openai/completion/serving.py: CatchOverloadErrorin streaming pathvllm/entrypoints/openai/responses/serving.py: CatchOverloadErrorin streaming pathDesign
max_waiting_time = 0): backward compatibleTesting plan
tools/test_overload_control_429.pyin rollout-infra repo