fix(pd): add configurable decode capacity admission limit - #1514
Merged
Conversation
sufubao
force-pushed
the
improve-429-handling
branch
from
August 26, 2026 10:26
ea8ce21 to
7b862dd
Compare
sufubao
force-pushed
the
improve-429-handling
branch
2 times, most recently
from
August 26, 2026 12:39
40e9708 to
1f36388
Compare
sufubao
force-pushed
the
improve-429-handling
branch
3 times, most recently
from
August 26, 2026 13:10
7465e88 to
75f12ad
Compare
sufubao
force-pushed
the
improve-429-handling
branch
from
August 26, 2026 13:12
75f12ad to
e225ca9
Compare
sufubao
force-pushed
the
improve-429-handling
branch
from
August 26, 2026 13:14
e225ca9 to
1637038
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
Add a PD-master admission guard that computes the current capacity for every incoming request by summing
running_max_req_sizeacross all registered decode nodes. If the Master already has that many in-flight requests, it raises the existingServerBusyErrorbefore multimodal preload, tokenization, or PD-stage waits.The guard is enabled by default. To explicitly restore the previous behavior, start the PD Master with:
Motivation
Overload may otherwise be detected only after entering the PD flow and waiting 60s/180s, so clients can wait a long time before receiving 429. Decode nodes already register their complete startup arguments with the Master, and disconnected nodes are removed from
decode_nodes, allowing the current node list to remain the single source of truth without a cached capacity value.This is intentionally temporary:
Checks
git diff --check