Release v1.0.11: gateway self-heals upstream after backend pod rollout#6
Closed
ZhiXiao-Lin wants to merge 3 commits into
Closed
Release v1.0.11: gateway self-heals upstream after backend pod rollout#6ZhiXiao-Lin wants to merge 3 commits into
ZhiXiao-Lin wants to merge 3 commits into
Conversation
added 3 commits
June 10, 2026 16:01
reqwest's RequestBuilder::timeout caps the WHOLE request including the streamed body, so SSE/chunked responses were hard-killed after the hardcoded 300s regardless of activity — every SSE stream died at 5 min. Move to a client-level read_timeout (idle, reset on every byte): a healthy stream with periodic keep-alive frames (~10s) never trips it and can run indefinitely; only a genuinely silent upstream is reaped. Bump to 1.0.10.
…service name image-app-publish names the Ingress and Service identically, so the ns-ingress-svc key doubled (default-arche-arche). Already live in the deployed gateway — committing so the released build matches production.
Root cause: hyper's idle connection pool is keyed by hostname, not resolved IP, with a 90s idle timeout > 30s passive-health recovery_time. After a backend Deployment rolls (new pod IP), pooled sockets to the dead old pod IP linger and get reused -> SendRequest fails -> backend marked unhealthy -> the half-open probe reuses another stale socket -> permanent 503 'No healthy backends' until the gateway is restarted. Fix: pool_idle_timeout 90s->5s + TCP keepalive 90s->15s (evict stale sockets before the recovery probe) and passive-health recovery_time 30s->10s. The 5s<10s invariant guarantees the half-open probe opens a FRESH connection that re-resolves DNS to the new pod IP, so the gateway self-heals within ~10s of a rollout instead of needing a manual restart.
Contributor
Author
|
Superseded: SSE fix is already on main via #5 (caused the conflict). Reopening a clean PR off current main with just the de-dup + connection-pool self-heal. |
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
Three fixes, bumping a3s-gateway to v1.0.11:
fix(proxy): self-heal upstream after backend pod rollout (the headline fix)
recovery_time. After a backend Deployment rolls (new pod IP), pooled sockets to the dead old pod IP linger and get reused →SendRequestfails → backend marked unhealthy → the half-open probe reuses another stale socket → permanent 503 "No healthy backends" until the gateway is restarted.pool_idle_timeout90s→5s + TCP keepalive 90s→15s + passive-healthrecovery_time30s→10s. The5s < 10sinvariant guarantees the half-open probe opens a FRESH connection that re-resolves DNS to the new pod IP → self-heals within ~10s instead of needing a manual restart.fix(k8s): collapse redundant router key when the Ingress name equals the backend Service name (already live in prod; committed for release parity).
fix(streaming): SSE idle read_timeout (already on this branch).
Why
Every app deploy (pod roll) was taking the gateway down with
{"error":"No healthy backends"}and only a manual gateway restart recovered it. This makes the gateway self-heal.Verification
cargo checkclean. Deploy plan: roll main gateway → verify → roll edge → verify; rollback to 1.0.10 ready.