Skip to content

feat: support HTTP/3 to upstream backends - #10068

Merged
zhaohuabing merged 16 commits into
envoyproxy:mainfrom
zhaohuabing:upstream-http3
Oct 19, 2026
Merged

zhaohuabing merged 16 commits into
envoyproxy:mainfrom
zhaohuabing:upstream-http3

Conversation

@zhaohuabing

@zhaohuabing zhaohuabing commented Sep 22, 2026 •

Copy link
Copy Markdown
Member

Fixes #10053

Adds http3 to BackendTrafficPolicy, enabling HTTP/3 to the backend. It applies to route backends only; setting it under a SecurityPolicy or EnvoyExtensionPolicy backend settings is an error, since those clusters are driven by Envoy's async client, which never records alt-svc. Two modes:

  • Auto, the default. Envoy uses HTTP/3 only once a backend has advertised it through an alt-svc header, and races a QUIC connection against a TCP one so it falls back to HTTP/1.1 or HTTP/2 when QUIC fails.
  • Always sends every request over QUIC and never falls back.

Two combinations are rejected at admission by CEL rules, because they contradict HTTP/3 outright:

  • useClientProtocol, plan to implement it in a follow-up PR
  • proxyProtocol, a TCP preamble with no QUIC equivalent

The rest depend on the backend rather than the policy, so the policy stays Accepted, HTTP/3 is left off for the affected route, and the policy reports a Warning condition naming the route and the reason:

  • a backend without TLS, since QUIC always runs over TLS. TLS comes from a BackendTLSPolicy or the Backend's spec.tls.
  • a backend forced to HTTP/1.1, such as a WebSocket backend
  • a backend with an HTTP/2 or gRPC appProtocol

The backend's own alt-svc header is stripped from the response after Envoy has recorded it. It names a port on the backend, which a browser would read as a port on the Gateway, and it would otherwise sit next to the Gateway's own alt-svc on listeners with downstream HTTP/3. The strip is done with the header mutation filter because a route-level removal runs before the alternate protocols cache filter sees the header; envoyproxy/envoy#48169 asks for a native option so this can be simplified later.

@netlify

netlify Bot commented Sep 22, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for cerulean-figolla-1f9435 ready!

Name Link
🔨 Latest commit 7ba77d6
🔍 Latest deploy log https://app.netlify.com/projects/cerulean-figolla-1f9435/deploys/6ad5dccb404d0a632f30215d
😎 Deploy Preview https://deploy-preview-10068--cerulean-figolla-1f9435.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@codecov

codecov Bot commented Sep 22, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 88.10811% with 44 lines in your changes missing coverage. Please review.
✅ Project coverage is 81.68%. Comparing base (88014a8) to head (7ba77d6).

Files with missing lines Patch % Lines
internal/gatewayapi/backendtrafficpolicy.go 90.57% 13 Missing ⚠️
...ternal/xds/translator/alternate_protocols_cache.go 85.96% 8 Missing ⚠️
internal/xds/translator/cluster.go 87.03% 7 Missing ⚠️
internal/ir/xds.go 87.23% 6 Missing ⚠️
internal/xds/translator/header_mutation.go 86.20% 4 Missing ⚠️
internal/gatewayapi/contexts.go 88.23% 2 Missing ⚠️
internal/xds/translator/httpfilters.go 60.00% 2 Missing ⚠️
internal/xds/translator/route.go 60.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #10068      +/-   ##
==========================================
+ Coverage   81.64%   81.68%   +0.03%     
==========================================
  Files         266      267       +1     
  Lines       41730    42048     +318     
==========================================
+ Hits        34071    34345     +274     
- Misses       7658     7702      +44     
  Partials        1        1              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@zhaohuabing zhaohuabing reopened this Sep 22, 2026
@zhaohuabing zhaohuabing added this to the v1.10.0-rc.1 Release milestone Sep 22, 2026
@zhaohuabing
zhaohuabing force-pushed the upstream-http3 branch 3 times, most recently from 08283cb to 523495d Compare September 22, 2026 10:58
@acelinkio

Copy link
Copy Markdown

Super excited for this! Looks like you are even supporting forwardauth via SecurityPolicy.

@@ -61,6 +61,7 @@ type BackendTrafficPolicy struct {
// +kubebuilder:validation:XValidation:rule="!has(self.targetRef) || !(self.targetRef.kind in ['Service', 'ServiceImport', 'Backend']) || !has(self.targetRef.sectionName)", message="sectionName is not supported when targeting a backend"
// +kubebuilder:validation:XValidation:rule="!has(self.targetRefs) || self.targetRefs.all(ref, !(ref.kind in ['Service', 'ServiceImport', 'Backend']) || !has(ref.sectionName))", message="sectionName is not supported when targeting a backend"
// +kubebuilder:validation:XValidation:rule="!has(self.compression) || !has(self.compressor)", message="either compression or compressor can be set, not both"
// +kubebuilder:validation:XValidation:rule="!has(self.http3) || !has(self.useClientProtocol) || !self.useClientProtocol", message="useClientProtocol cannot be used together with http3"

@zhaohuabing zhaohuabing Oct 12, 2026 •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm leaving this out for now, since this PR is already quite large. We can support this in a follow-up, tracked in #10250.

@zhaohuabing
zhaohuabing force-pushed the upstream-http3 branch 5 times, most recently from 321dc5d to b981f08 Compare October 14, 2026 07:23
zhaohuabing and others added 14 commits October 18, 2026 02:00
Signed-off-by: Huabing (Robin) Zhao <[email protected]>
Signed-off-by: Huabing (Robin) Zhao <[email protected]>
It now sits next to the alternate protocols cache patch, and the
downstream alt-svc append in translator.go is back to what main does.
The strip runs after the router anyway, so the duplicate route header
on an HTTP/3 listener is removed before the client sees it.

Signed-off-by: Huabing (Robin) Zhao <[email protected]>
Signed-off-by: Huabing (Robin) Zhao <[email protected]>
A standalone Envoy with a static config listens for TLS and QUIC on the
same port, answers with a direct response, and reports the protocol in
the x-protocol header, which the test now checks instead of the body.

Signed-off-by: Huabing (Robin) Zhao <[email protected]>
Signed-off-by: Huabing (Robin) Zhao <[email protected]>
The router adds route-level response headers before the alternate
protocols cache filter looks at the response, so on an upstream HTTP/3
route the gateway's own alt-svc was recorded as the backend's. When the
advertised port matched the backend port, Auto mode then tried QUIC
against a backend that never offered it. Those routes now get the header
from the header mutation filter only, which runs after the cache filter.

Signed-off-by: Huabing (Robin) Zhao <[email protected]>
Signed-off-by: Huabing (Robin) Zhao <[email protected]>
It is the listener port's client-facing HTTP/3 setting, so the name now
says which side it refers to next to the upstream HTTP/3 helpers.

Signed-off-by: Huabing (Robin) Zhao <[email protected]>
Signed-off-by: Huabing (Robin) Zhao <[email protected]>
Signed-off-by: Huabing (Robin) Zhao <[email protected]>
The page grew a long backend section appended after the client walkthrough. Group the
existing steps under "HTTP/3 to Clients" and break the backend text into prerequisites,
the two modes and limitations under "HTTP/3 to Backends".

Signed-off-by: Huabing (Robin) Zhao <[email protected]>
Signed-off-by: Huabing (Robin) Zhao <[email protected]>
Fold the duplicate-parentrefs case into the base fixture and the plain mergeBackends case
into the mixed one, since each only added one route to a copy of the other. Drop the fqdn and
no-sni routes from the xds fixture: they covered an SNI workaround that is gone, and nothing
in the HTTP/3 path depends on the address type or SNI.

Signed-off-by: Huabing (Robin) Zhao <[email protected]>
Signed-off-by: Huabing (Robin) Zhao <[email protected]>
Signed-off-by: Huabing (Robin) Zhao <[email protected]>
It sits next to backendtrafficpolicy-with-http3-gateway, and the Service-targeted
case already lives in the mergebackends-btp-backend-target family.

Signed-off-by: Huabing (Robin) Zhao <[email protected]>
Signed-off-by: Huabing (Robin) Zhao <[email protected]>
The Service-targeted mergeBackends case now sits next to the gateway-targeted one
as backendtrafficpolicy-with-http3-<target>-mergebackends.

Signed-off-by: Huabing (Robin) Zhao <[email protected]>
Signed-off-by: Huabing (Robin) Zhao <[email protected]>
A CEL rule on BackendCluster now turns away http3 for every policy and EnvoyProxy
sink that embeds it, so the translator no longer needs its own check or the golden
that pinned it. One CEL test case covers the rule.

Signed-off-by: Huabing (Robin) Zhao <[email protected]>
Signed-off-by: Huabing (Robin) Zhao <[email protected]>
Keep the modes and the TLS requirement, drop the walkthrough of each warning.

Signed-off-by: Huabing (Robin) Zhao <[email protected]>
Signed-off-by: Huabing (Robin) Zhao <[email protected]>
Signed-off-by: Huabing (Robin) Zhao <[email protected]>
arkodg
arkodg previously approved these changes Oct 19, 2026

@arkodg arkodg left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM thanks

@zirain

zirain commented Oct 19, 2026

Copy link
Copy Markdown
Member

/retest

zirain
zirain previously approved these changes Oct 19, 2026
The IPv6 e2e cell gives the backend pod no IPv4 address, so the 0.0.0.0 listeners never got a connection and the gateway returned 503. Binding :: with ipv4_compat covers both families.

Signed-off-by: Huabing (Robin) Zhao <[email protected]>
Signed-off-by: Huabing (Robin) Zhao <[email protected]>
@zhaohuabing
zhaohuabing dismissed stale reviews from arkodg and zirain via 7ba77d6 October 19, 2026 09:03
@zhaohuabing
zhaohuabing merged commit cac99bc into envoyproxy:main Oct 19, 2026
47 checks passed
@zhaohuabing
zhaohuabing deleted the upstream-http3 branch October 19, 2026 10:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support HTTP/3 to upstream backends

4 participants