Repository navigation
Grow and jitter consecutive throttle waits in the retrier - #2939
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
palfrey
reviewed
Oct 15, 2026
amankrx
force-pushed
the
fix/throttle-wait-growth
branch
from
October 15, 2026 12:29
6ca9a61 to
e2b981d
Compare
…t it through the Azure store
Collaborator
|
@amankrx im not sure if per-request throttling is the right approach here, we should probably figure out some high level account wide backoff? |
corcillo
reviewed
Oct 15, 2026
corcillo
reviewed
Oct 15, 2026
corcillo
requested changes
Oct 15, 2026
Member
Author
We can add that separately. This should be helpful. |
corcillo
approved these changes
Oct 16, 2026
This branch was successfully deployed
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.
What and why
A throttled response (
RetryResult::RetryAfter) inside the throttle budget sleeps exactly what the store asked, with no growth and no jitter. Azure sends noRetry-Afteron an egress throttle, so every process behind one account sleeps the floor and retries in lockstep until the budget is gone.Retrier::with_throttle_max_waitmakes the n-th consecutive throttle wait the ask times2^(n-1), capped, jittered with the store'sretry.jitter, never below the ask, and a plain retry ends the streak. The Azure store passesthrottle_retry_max_delay_sas the cap. Other stores are unchanged.How was this verified?
Four new tests in
retry_test.rswith a recording sleep: waits double up to the cap (2, 4, 8, 16, 30, 30). Existing throttle tests pass unchanged, so the default path did not move. Not yet run against a throttling account.Risk
Low. Only a retrier with a cap set changes, and only the Azure store sets one. The first wait is as before; later waits are longer, bounded by the existing cap. No config or wire change.
AI assistance
An agent drafted the change and I reviewed every line.