Skip to content

Preserve streamed responses through Envoy - #49

Draft
DavidIlie wants to merge 1 commit into
codex/websocket-upgrade-dispatchfrom
codex/portable-streaming-timeouts
Draft

Preserve streamed responses through Envoy#49
DavidIlie wants to merge 1 commit into
codex/websocket-upgrade-dispatchfrom
codex/portable-streaming-timeouts

Conversation

@DavidIlie

@DavidIlie DavidIlie commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

What

  • set timeouts.request: 0s on every application rule emitted for the generic Envoy Gateway target
  • keep the timeout behavior provider-owned: GKE output is unchanged
  • cover path, internal pool-header, and catch-all rules in the template and generated-chart tests
  • document the remaining idle-progress and application execution bounds

Why

Envoy applies a 15-second total route timeout by default. That deadline remains active until the entire response completes, so healthy Next.js Route Handler streams, RSC, and SSE can be truncated even while bytes are flowing.

Gateway API defines 0s as disabled. The generic target should remove that whole-response deadline and retain the separate bounds that match the actual failure modes: pool time-to-headers and route maxDuration, plus Envoy's stream-idle timeout.

How

renderHTTPRoute accepts a provider-owned disableRequestTimeout switch. The generic provider opts in and the template injects the literal timeout into every generated application rule. The literal is deliberately not exposed as arbitrary user configuration, avoiding another duration-validation and YAML-injection surface.

Stack

  1. Add generated WebSocket upgrade dispatch #47 — generated WebSocket upgrade dispatch
  2. this PR — portable streaming timeout parity
  3. Drain pool protocols without truncating streams #50 — protocol-aware pool shutdown
  4. Verify portable rollout continuity #51 — real-Envoy rollout conformance and lifecycle docs

This PR remains draft while #47 is draft.

Scope

This changes only the generic Envoy Gateway target. It does not add or change GKE GCPBackendPolicy/connection-draining configuration; that provider-specific concern remains explicitly out of scope, as noted on #47.

Testing

  • focused gateway/chart tests: 85 passed
  • stack-head npm test: 2,901 passed, 20 skipped
  • npx tsc --noEmit
  • npm run lint
  • npm run fmt:check
  • npm run build
  • git diff --check

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant