[Feature] Add --max-unfinished-requests apiserver parameter#39492
Open
chaunceyjiang wants to merge 2 commits intovllm-project:mainfrom
Open
[Feature] Add --max-unfinished-requests apiserver parameter#39492chaunceyjiang wants to merge 2 commits intovllm-project:mainfrom
chaunceyjiang wants to merge 2 commits intovllm-project:mainfrom
Conversation
Add new CLI argument --max-unfinished-requests to limit concurrent unfinished requests across all API servers. When the limit is exceeded, new requests are rejected with 503 Service Unavailable. Features: - Single server mode: checks local server_load_metrics directly - Multi-server mode: uses shared multiprocessing.Array to aggregate counts from all API servers and check the total - Auto-enables --enable-server-load-tracking when this option is set Signed-off-by: chaunceyjiang <chaunceyjiang@gmail.com>
Contributor
There was a problem hiding this comment.
Code Review
This pull request implements a global request limit across multiple API servers using shared memory. It introduces the --max-unfinished-requests parameter and updates the load_aware_call decorator to reject requests with a 503 error when the limit is reached. Review feedback identifies several critical issues: the shared memory array is not updated during request completion, leading to stale data; a race condition exists in the limit-checking logic; and the shared array should use a lock to ensure consistent reads during summation.
Signed-off-by: chaunceyjiang <chaunceyjiang@gmail.com>
9990397 to
bc30971
Compare
Collaborator
Author
|
Hi @orozery PTAL. |
Collaborator
Author
|
/cc @DarkLight1337 PTAL. |
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.
Purpose
Feature implementation #18826
CLOSE #18826
CLOSE #21352
Add new CLI argument --max-unfinished-requests to limit concurrent unfinished requests across all API servers. When the limit is exceeded, new requests are rejected with 503 Service Unavailable.
Test Plan
Test Result
Essential Elements of an Effective PR Description Checklist
supported_models.mdandexamplesfor a new model.