HTTP Protocol Options
This extension may be referenced by the qualified name envoy.upstreams.http.http_protocol_options
extensions.upstreams.http.v3.HttpProtocolOptions
HttpProtocolOptions specifies Http upstream protocol options. This object is used in typed_extension_protocol_options, keyed by the name envoy.extensions.upstreams.http.v3.HttpProtocolOptions.
This controls what protocol(s) should be used for upstream and how said protocol(s) are configured.
This replaces the prior pattern of explicit protocol configuration directly in the cluster. So a configuration like this, explicitly configuring the use of HTTP/2 upstream:
|
|
Would now look like this:
|
|
Schema:
|
|
-
common_http_protocol_options
(config.core.v3.HttpProtocolOptions) This contains options common across HTTP/1 and HTTP/2
-
upstream_http_protocol_options
(config.core.v3.UpstreamHttpProtocolOptions) This contains common protocol options which are only applied upstream.
-
explicit_http_config
(extensions.upstreams.http.v3.HttpProtocolOptions.ExplicitHttpConfig) To explicitly configure either HTTP/1 or HTTP/2 (but not both!) use explicit_http_config. If the explicit_http_config is empty, HTTP/1.1 is used.
This controls the actual protocol to be used upstream.
Precisely one of
explicit_http_config
,use_downstream_protocol_config
,auto_config
must be set.1 2 3 4 5
{ "http_protocol_options": "{...}", "http2_protocol_options": "{...}", "http3_protocol_options": "{...}" }
-
use_downstream_protocol_config
(extensions.upstreams.http.v3.HttpProtocolOptions.UseDownstreamHttpConfig) This allows switching on protocol based on what protocol the downstream connection used.
This controls the actual protocol to be used upstream.
Precisely one of explicit_http_config, use_downstream_protocol_config, auto_config must be set.
-
auto_config
(
extensions.upstreams.http.v3.HttpProtocolOptions.AutoHttpConfig
) This allows switching on protocol based on ALPNThis controls the actual protocol to be used upstream.
Precisely one of explicit_http_config, use_downstream_protocol_config, auto_config must be set.
ALPN Protocol is negotiated
extensions.upstreams.http.v3.HttpProtocolOptions.AutoHttpConfig
[extensions.upstreams.http.v3.HttpProtocolOptions.AutoHttpConfig proto]
If this is used, the cluster can use either HTTP/1 or HTTP/2, and will use whichever protocol is negotiated by ALPN with the upstream. Clusters configured with AutoHttpConfig
will use the highest available protocol; HTTP/2 if supported, otherwise HTTP/1. If the upstream does not support ALPN, AutoHttpConfig will fail over to HTTP/1. This can only be used with transport sockets which support ALPN. Using a transport socket which does not support ALPN will result in configuration failure. The transport layer may be configured with custom ALPN, but the default ALPN for the cluster (or if custom ALPN fails) will be “h2,http/1.1”.
|
|
-
http_protocol_options
(config.core.v3.Http1ProtocolOptions)
-
http2_protocol_options
(config.core.v3.Http2ProtocolOptions)