docs: explain upstream protocol selection in BackendTrafficPolicy concept page #10732
<span aria-hidden="true">✅</span> Deploy Preview for cerulean-figolla-1f9435 ready!
Built without sensitive environment variables
| Name | Link |
|:-:|------------------------|
|<span aria-hidden="true">🔨</span> Latest commit | 3212580d053c7d60ec0e33519c03ec1174fbbb83 |
|<span aria-hidden="true">🔍</span> Latest deploy log | https://app.netlify.com/projects/cerulean-figolla-1f9435/deploys/6b0cd150139c6b4cec6451e5 |
|<span aria-hidden="true">😎</span> Deploy Preview | https://deploy-preview-10732--cerulean-figolla-1f9435.netlify.app |
|<span aria-hidden="true">📱</span> Preview on mobile | <details><summary> Toggle QR Code... </summary><br /><br />!QR Code<br /><br />_Use your smartphone camera to open QR code link._</details> |
---
<!-- cerulean-figolla-1f9435 Preview -->
_To edit notification comments on pull requests, go to your Netlify project configuration._
<!-- codex-pull-request-review-summary -->
<!-- codex-review-state:v1 {"code_review":{"commit_sha":"3212580d053c7d60ec0e33519c03ec1174fbbb83","has_any_findings":false,"has_unresolved_findings":false,"status":"completed"},"security_review":{"commit_sha":null,"has_any_findings":null,"has_unresolved_findings":null,"status":null}} -->
<details>
<summary><strong>Codex Review Summary</strong>: ✅ Completed</summary>
This comment shows the latest Codex review activity on this pull request.
| Review | Status | Commit | Review trigger |
| --- | --- | --- | --- |
| 📝 Code Review | ✅ Completed <relative-time datetime="2026-11-30T01:30:23.170844Z">2026-11-30T01:30:23.170844Z</relative-time> | 3212580 | New commits |
<details> <summary>ℹ️ About Codex in GitHub</summary>
<br/>
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.
</details>
</details>
<sub><sub>!P2 Badge</sub></sub> Qualify protocol mirroring for HTTP/3 clients
When a Gateway accepts HTTP/3, useClientProtocol: true does not preserve that protocol upstream. The flag's branch in buildTypedExtensionProtocolOptions supplies only HTTP/1 and HTTP/2 options (internal/xds/translator/cluster.go:1372–1377), while upstream HTTP/3 requires separate http3 configuration that is explicitly incompatible with this flag (internal/ir/xds.go:2478–2481). The unqualified “same HTTP protocol” guidance can therefore lead users to select this flag for an HTTP/3-only backend and encounter upstream failures. Qualify the mirroring guarantee and mention the HTTP/3 exception.
Useful? React with 👍 / 👎.
<!-- codex-code-review-finding:v1 -->
<!-- codex-review-receipt:v1 -->
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1c07b89d0a
<details> <summary>ℹ️ About Codex in GitHub</summary>
<br/>
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
</details>
Correction to the description: the useClientProtocol bullet was inaccurate for HTTP/3. The automated review was right that it only covers HTTP/1 and HTTP/2 clients. In 3212580 the bullet now says an HTTP/3 client is not forwarded over HTTP/3, and that useClientProtocol cannot be used together with http3. This is still a docs-only change. I haven't run the site build or a live HTTP/3 request, and CI on the new head is still pending.
Hi team, could you please review this when you have a moment?
In short: Explain upstream protocol selection in BackendTrafficPolicy concept page.
I think this will be really valuable. You may want to take a look. Thanks!
Hi team, could you please review this when you have a moment?
In short: Explain upstream protocol selection in BackendTrafficPolicy concept page.
I think this will be really valuable. You may want to take a look. Thanks!
Hi @zirain, @zhaohuabing, could you please review this when you have a moment?
In short: Explain upstream protocol selection in BackendTrafficPolicy concept page.
I think this will be really valuable. You may want to take a look. Thanks!
Approved these changes.
zirain
MaxonT
This adds a docs section on backend protocol selection, which is what issue #8773 asks for, and I haven't changed any code in the gateway itself.
Fixes #8773
The BackendTrafficPolicy concept page documents targeting and merging, but not how Envoy Gateway picks the HTTP protocol towards a backend, which is what the issue asks for. This adds an "Upstream Protocol Selection" section that covers:
appProtocol: kubernetes.io/h2con a Service port, orgateway.envoyproxy.io/h2cin aBackend'sappProtocols, forHTTPRoutebackends,GRPCRoutebackends (and thegrpcappProtocol on anHTTPRoutebackend), anduseClientProtocol, which follows the client's protocol,and states that the
http2field only tunes HTTP/2 settings and does not enable HTTP/2, as @arkodg described in #8648.I checked each statement against
internal/gatewayapi/route.go(resolveBackendProtocol,inspectAppProtocolByRouteKind),internal/xds/translator/cluster.go(useClientProtocol,requiresHTTP2Options) and the field comment inapi/v1alpha1/backendtrafficpolicy_types.go. I left out the BackendTLSPolicy and ALPN route that was mentioned in #8648, because I could not confirm it from the code. #9574 attempted the same topic and was closed as stale; this is a smaller section on the same page.Only
site/content/en/latest/concepts/gateway_api_extensions/backend-traffic-policy.mdchanges (docs only, no API or behaviour change).Checks
markdownlint-cliwith.github/markdown_lint_config.jsonexits 0 on the changed file. Not run: the docs site build, a live cluster, and the repository CI on this head. The commit is signed off (DCO).