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
proxy: the app-facing HTTP listener closes idle client connections after 5 minutes — an HTTP/1.1 client reusing one at that instant gets a reset (1 in 270,000 under sortie) #1350
Found on the first sortie e2e runs on talos-main (2026-10-07, chart 2.4.11).
Observed. Run 3 (15 min, 60 rps per node, HTTP/1.1, no rollouts): one request of 270,000 ended as stream_resets_before_headers / connection_termination in the client (target svc-3, engine on main-worker-03). The mesh's access logs hold 269,999 rows on the source side and 269,999 on the destination side, all 200 with no flag: the request never reached the proxy's HTTP layer. On that node, envoy_http_capture_http_downstream_cx_idle_timeout_total went 31 → 32 between 11:57:55Z and 11:58:00Z; the client's reset counter first appears in its 11:58:10Z flush. Over the 16-minute run the capture listener idle-closed 13–37 client connections per node.
Mechanism.downstreamIdleTimeout = 5 * time.Minute (agent/internal/xds/proxy/networkfilter.go) is applied by buildHTTPConnectionManager to BOTH the inbound mesh listener (peer proxies) and the app → proxy listener. A client that keeps spare keep-alive connections (opened during a latency spike) has them closed by the proxy after 5 idle minutes; HTTP/1.1 has no GOAWAY, so a request written onto a connection the server is closing at that instant is lost — the classic keep-alive race. A client that retries an idempotent request on a reused-connection failure (Go's net/http, hence k6, and browsers) hides it; one that does not (Envoy-based clients such as sortie's engine, many gRPC-less HTTP/1 pools) surfaces a reset. A single 200 row with flag DC seen from the proxy side in run 2 is probably the same race from the other end (unproven).
The 5-minute value exists for the INBOUND listener: peers reclaim their idle upstream connections at 30 s (config.UpstreamIdleTimeout), and the old 1-hour default let a peer's leaked connections pin ~7k inbound connections per listener. That reasoning does not apply to the app-facing side, where the usual rule is the opposite: the server's idle timeout should EXCEED the client's, so the client always closes first.
Options.
Split the constant: keep 5 min on inbound; give the app-facing (capture/outbound) HCM a longer idle timeout (Envoy's 1 h default, or a chart value) so ordinary clients (idle timeouts of 30–120 s) always close first. Check what that does to connection counts per pod under churn.
Leave it and document that HTTP/1.1 clients must retry on a stale connection (most do).
For HTTP/2 nothing is needed (GOAWAY drains).
Add an envoy_validate assertion for whichever is chosen, a kind test that holds an idle keep-alive connection past the timeout and reuses it, and a runbook line. Independently, the load driver should set its own upstream idle timeout below the proxy's (asked of sortie).
Activity