Repository navigation
feat(global-frontend): fail over when a pool frontend can't be reached - #17552
Draft
jthomson04 wants to merge 3 commits into
Draft
jthomson04 wants to merge 3 commits into
jthomson04 wants to merge 3 commits into
Conversation
Contributor
Author
|
/ok to test c08c52b |
jthomson04
force-pushed
the
jthomson04/global-frontend-failover
branch
from
October 29, 2026 00:09
c08c52b to
e31cffd
Compare
Contributor
Author
|
/ok to test e31cffd |
Contributor
✅ Dynamo PR CI passed — run 40931437125 (attempt 1) on
|
jthomson04
force-pushed
the
jthomson04/global-frontend-passthrough
branch
from
October 29, 2026 04:10
b4dbaa9 to
f088c63
Compare
jthomson04
force-pushed
the
jthomson04/global-frontend-failover
branch
from
October 29, 2026 04:10
e31cffd to
98fe133
Compare
This was referenced Oct 29, 2026
Contributor
Author
|
/ok to test 98fe133 |
Contributor
jthomson04
force-pushed
the
jthomson04/global-frontend-passthrough
branch
from
October 29, 2026 05:17
f088c63 to
7c924bc
Compare
jthomson04
force-pushed
the
jthomson04/global-frontend-failover
branch
from
October 29, 2026 05:17
98fe133 to
c09fdfa
Compare
Contributor
Author
|
/ok to test c09fdfa |
Serve the Global Frontend's own Prometheus families, dynamo_global_frontend_*: requests per pool by response status (with a local label for the in-region share, and cancelled for a client that leaves before the pool answers), requests answered without a pool, time to first byte and duration per pool, responses that broke off, and requests in flight per pool. Series are labelled with the pool's name and region, never with the request's model. Pools now carry a name for people, their <cluster>/<namespace>/<DGD name>. Inter-token latency and token counts need the stream parsed and stay with the pool frontends. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: jthomson04 <jwillthomson19@gmail.com>
jthomson04
force-pushed
the
jthomson04/global-frontend-passthrough
branch
from
October 29, 2026 16:57
7c924bc to
eb4f370
Compare
Contributor
Author
|
/ok to test 298196c |
jthomson04
force-pushed
the
jthomson04/global-frontend-failover
branch
from
October 29, 2026 17:44
c09fdfa to
298196c
Compare
A Dynamo pool frontend sends its response headers once a worker has the request, so a client that gives up while a worker queues its request counts under the pool's status, not as cancelled. Also note that an SSE keep-alive before the first token counts as the first byte, and list no_response in the README. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: jthomson04 <jwillthomson19@gmail.com>
A send to a pool frontend that fails before the pool has the request body (connection refused or timed out, or a failed name lookup) now goes to one other pool instead of returning 503. The body sits in a slot the upload stream takes on its first poll, so it is still freed once written; a send that fails after the pool took it is not retried, since the pool may be running the request. Each send counts at its own pool in /metrics. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: jthomson04 <jwillthomson19@gmail.com>
Contributor
Author
|
/ok to test 070debd |
jthomson04
force-pushed
the
jthomson04/global-frontend-failover
branch
from
October 29, 2026 18:30
298196c to
070debd
Compare
1 task done
Base automatically changed from
jthomson04/global-frontend-passthrough
to
main
October 29, 2026 19:45
1 task done
1 task done
1 task done
This branch has not been 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.
Overview
When the Global Frontend's send to a pool frontend fails before the pool has the request, the request now goes to one other pool instead of returning 503. A request is never sent again once a pool may be running it.
On a four-region live run of the Global Frontend, the only two client errors were 503s where the send to one region's pool frontend failed and another pool could have served the request. Those runs logged only "error sending request"; #17524 now logs the cause, so the next one shows whether this retry covers it.
Stacked on #17525 (
/metrics). This PR's base is that branch; it will be retargeted once #17525 merges.Key Changes
About 15 core lines in
proxy.rs; no new flags.affinity, the session's pin moves to wherever the request lands.dynamo_global_frontend_requests_total, so a send that failed over shows asno_responseat the first pool.Per request when nothing fails: one small allocation for the body slot and a copy of the header map. Nothing runs per token.
Validation
/metricsa_request_goes_to_another_pool_when_its_pool_cannot_be_reacheda_request_the_pool_may_have_is_not_sent_againno_responseunreachable_pools_are_unavailableThe forwarding tests ran 15 times in a row without a failure. No live run: the change acts only when a pool frontend can't be reached.
Issues and Ongoing Work
Pull Request Checklist
/pr-checklistskill.🤖 Generated with Claude Code