You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
eds: a source proxy still picks an endpoint 3.4–3.8 s after the destination agent marked it DRAINING (the requests behind #1087's 504s) #1103
Found while root-causing #1087 (PR #1101). Joining the five 2026-10-01 source 504 UT lines to the destination-reporter access-log lines by x_request_id shows every one of those requests was sent to an endpoint its destination agent had marked DRAINING 3.4–3.8 s earlier; the source still selected it. The same happens with the source agent up, so it is not the agent-restart overlap the original issue assumed.
This is what actually produces the failures: the requests are delivered to a dying pod and cannot be retried. #1101 only shortens the hang (15 s → a bounded transport-liveness close); it does not reduce the count (5–6 per soak, TRIPLE roll).
To establish: where the 3.4–3.8 s goes — destination agent early-deregistration (two-phase drain, #152) → registrar broadcast fan-out → source agent watch → EDS push → Envoy host set update — especially while agents are being rolled (registrar stream re-establishment, snapshot debounce). Then bound it (target: source stops selecting a DRAINING endpoint well inside the pod's termination grace before its netns/veth is torn down), or make the destination hold the pod's network until the drain has propagated.
Evidence: PR #1101 body; session scratchpad e1087/ and soak-csi-039/q/k6fails.tsv.
The premise in this issue was wrong for both 2026-10-01 instances: registrar fan-out was fast (the peer replica saw the drain mark 0.14 s later, push not poll). In both cases the source agent was mid-restart, so the source proxy had no ADS stream and kept routing on stale EDS — and after the agent came back, Envoy's fully-jittered xDS reconnect backoff (500 ms base, 30 s cap) kept the proxy away for seconds more (w04: agent served xDS at 05:41:39.93, proxy reconnected at 05:41:48.34; 24 s without a stream in total).
#1118 removes the parts that are ours to remove cheaply:
proxy bootstrap ADS retry_back_off {0.1s, 1s} — reconnect within 1 s of the agent serving again (kind: 0.17–12.75 s → 0.40–0.84 s);
the agent's first serve waits (≤5 s) for the local pods' client certificates, so a fast-reconnecting proxy is not told to remove its QUIC twins (seen on kind with (1) alone: 56 × 503 NC);
the registrar write-behind queue flushes on enqueue instead of on the next 500 ms tick.
What remains, and why this stays open:
The source agent's own outage dominates (15.5 s on talos w04; 6–16 s on kind), longer than a destination pod's remaining life after its drain mark. The three w04 requests left before the restarted agent's socket was even open; no reconnect speed saves those. Directions: shorten the agent's restart-to-first-serve; or make the destination side hold the pod's inbound/network for a bounded drain-propagation window that covers a source-agent restart; or have a rolling agent hand its ADS streams to its successor.
The destination's 5 s 503 UF when connecting to an app that already exited (a fast refusal would have been retried by the source) — root cause not established.
The kubernetes registry backend keeps a DRAINING mark only on the registrar replica that received it — not measured.
Activity
bpalermo commentedon Oct 1, 2026
Root cause corrected (PR #1118,
Refs)The premise in this issue was wrong for both 2026-10-01 instances: registrar fan-out was fast (the peer replica saw the drain mark 0.14 s later, push not poll). In both cases the source agent was mid-restart, so the source proxy had no ADS stream and kept routing on stale EDS — and after the agent came back, Envoy's fully-jittered xDS reconnect backoff (500 ms base, 30 s cap) kept the proxy away for seconds more (w04: agent served xDS at 05:41:39.93, proxy reconnected at 05:41:48.34; 24 s without a stream in total).
#1118 removes the parts that are ours to remove cheaply:
retry_back_off {0.1s, 1s}— reconnect within 1 s of the agent serving again (kind: 0.17–12.75 s → 0.40–0.84 s);What remains, and why this stays open:
503 UFwhen connecting to an app that already exited (a fast refusal would have been retried by the source) — root cause not established.🤖 Generated with Claude Code
https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr
fix(xds): a restarted agent's proxy hears drain marks within 1 s of t…
fix(xds): a request delivered to a pod in teardown fails 503 within 1…
bpalermo commentedon Oct 2, 2026
Verified on the 2026-10-02 soak: 0 × 504 UT and 0 × 503 UC at any source in the whole window including the TRIPLE; k6 0 failures / 9,179,946.
chore(e2e): two kind harnesses that nothing runs or names are removed (…
chore(e2e): six kind reproductions that no workflow ran leave this re…