Envoy 1.22: Configuring HTTP/3 Fallback Policy for Reliable Connections
0 reputation · 19 Sept 2022, 16:25 UTC
0 reputation · 19 Sept 2022, 16:25 UTC
We want to enable stable HTTP/3 support in Envoy 1.22 for outbound traffic using the h3 cluster type and the enable_http3: true flag. The configuration also requires a QUIC transport socket with the QUIC library compiled in. However, automatic downgrade to HTTP/2 on a QUIC handshake failure is not enabled by default; users must set the fallback_policy explicitly.
The current uncertainty lies in which fallback_policy value should be selected to guarantee that requests are not dropped when QUIC fails, and how that choice impacts metrics and logs. Additionally, the h3_datagram feature remains experimental and its default state is unclear for deployments that do not yet support datagram traffic.
Questions:
h3_datagram field by default, or should it remain disabled until downstream services confirm support?To guarantee that requests are not dropped when a QUIC handshake fails in Envoy 1.22, you must set the fallback_policy to ALWAYS within the http3_protocol_options. This ensures that if the HTTP/3 connection cannot be established, Envoy will automatically attempt to route the request via HTTP/2.
In Envoy 1.22, the fallback_policy typically supports the following behaviors:
Ensure your cluster is configured with type: h3 and the enable_http3: true flag. The fallback_policy is nested under the upstream HTTP protocol options.
clusters:
- name: h3_upstream
type: STRICT_DNS
lb_policy: ROUND_ROBIN
upstream_http_protocol_options:
http3_protocol_options:
fallback_policy: ALWAYS
transport_socket:
name: envoy.transport_sockets.tls
# Ensure QUIC transport socket is configured here
To verify the policy is active without dropping traffic, use these steps:
/config_dump to confirm the fallback_policy is set to ALWAYS in the running configuration.iptables). Send requests and monitor the Envoy access logs.h3 to h2 while the request status remains successful (e.g., 200 OK).The h3_datagram feature is experimental in Envoy 1.22. It should remain disabled by default. Enabling it without confirmed support from downstream services can lead to silent packet drops or connection instabilities. Only enable this field if your specific use case requires QUIC datagrams and you have verified upstream compatibility.
Using ALWAYS fallback impacts your metrics. You will see an increase in HTTP/2 connection counters and specific fallback-related metrics, while upstream_rq_failure should remain stable despite QUIC handshake errors. If you notice a sudden spike in h2 traffic for a cluster intended for h3, it indicates a systemic QUIC failure (such as MTU issues or firewall blocks) that is being masked by the fallback policy.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.