Struct Http2ProtocolOptions

Source
pub struct Http2ProtocolOptions {
Show 16 fields pub hpack_table_size: Option<UInt32Value>, pub max_concurrent_streams: Option<UInt32Value>, pub initial_stream_window_size: Option<UInt32Value>, pub initial_connection_window_size: Option<UInt32Value>, pub allow_connect: bool, pub allow_metadata: bool, pub max_outbound_frames: Option<UInt32Value>, pub max_outbound_control_frames: Option<UInt32Value>, pub max_consecutive_inbound_frames_with_empty_payload: Option<UInt32Value>, pub max_inbound_priority_frames_per_stream: Option<UInt32Value>, pub max_inbound_window_update_frames_per_data_frame_sent: Option<UInt32Value>, pub stream_error_on_invalid_http_messaging: bool, pub override_stream_error_on_invalid_http_message: Option<BoolValue>, pub custom_settings_parameters: Vec<SettingsParameter>, pub connection_keepalive: Option<KeepaliveSettings>, pub use_oghttp2_codec: Option<BoolValue>,
}
Expand description

[#next-free-field: 17]

Fields§

§hpack_table_size: Option<UInt32Value>

Maximum table size <<https://httpwg.org/specs/rfc7541.html#rfc.section.4.2>_> (in octets) that the encoder is permitted to use for the dynamic HPACK table. Valid values range from 0 to 4294967295 (2^32 - 1) and defaults to 4096. 0 effectively disables header compression.

§max_concurrent_streams: Option<UInt32Value>

Maximum concurrent streams <<https://httpwg.org/specs/rfc7540.html#rfc.section.5.1.2>_> allowed for peer on one HTTP/2 connection. Valid values range from 1 to 2147483647 (2^31 - 1) and defaults to 2147483647.

For upstream connections, this also limits how many streams Envoy will initiate concurrently on a single connection. If the limit is reached, Envoy may queue requests or establish additional connections (as allowed per circuit breaker limits).

This acts as an upper bound: Envoy will lower the max concurrent streams allowed on a given connection based on upstream settings. Config dumps will reflect the configured upper bound, not the per-connection negotiated limits.

§initial_stream_window_size: Option<UInt32Value>

Initial stream-level flow-control window <<https://httpwg.org/specs/rfc7540.html#rfc.section.6.9.2>_> size. Valid values range from 65535 (2^16 - 1, HTTP/2 default) to 2147483647 (2^31 - 1, HTTP/2 maximum) and defaults to 268435456 (256 * 1024 * 1024).

NOTE: 65535 is the initial window size from HTTP/2 spec. We only support increasing the default window size now, so it’s also the minimum.

This field also acts as a soft limit on the number of bytes Envoy will buffer per-stream in the HTTP/2 codec buffers. Once the buffer reaches this pointer, watermark callbacks will fire to stop the flow of data to the codec buffers.

§initial_connection_window_size: Option<UInt32Value>

Similar to initial_stream_window_size, but for connection-level flow-control window. Currently, this has the same minimum/maximum/default as initial_stream_window_size.

§allow_connect: bool

Allows proxying Websocket and other upgrades over H2 connect.

§allow_metadata: bool

[#not-implemented-hide:] Hiding until Envoy has full metadata support. Still under implementation. DO NOT USE.

Allows sending and receiving HTTP/2 METADATA frames. See metadata docs for more information.

§max_outbound_frames: Option<UInt32Value>

Limit the number of pending outbound downstream frames of all types (frames that are waiting to be written into the socket). Exceeding this limit triggers flood mitigation and connection is terminated. The http2.outbound_flood stat tracks the number of terminated connections due to flood mitigation. The default limit is 10000.

§max_outbound_control_frames: Option<UInt32Value>

Limit the number of pending outbound downstream frames of types PING, SETTINGS and RST_STREAM, preventing high memory utilization when receiving continuous stream of these frames. Exceeding this limit triggers flood mitigation and connection is terminated. The http2.outbound_control_flood stat tracks the number of terminated connections due to flood mitigation. The default limit is 1000.

§max_consecutive_inbound_frames_with_empty_payload: Option<UInt32Value>

Limit the number of consecutive inbound frames of types HEADERS, CONTINUATION and DATA with an empty payload and no end stream flag. Those frames have no legitimate use and are abusive, but might be a result of a broken HTTP/2 implementation. The `http2.inbound_empty_frames_flood`` stat tracks the number of connections terminated due to flood mitigation. Setting this to 0 will terminate connection upon receiving first frame with an empty payload and no end stream flag. The default limit is 1.

§max_inbound_priority_frames_per_stream: Option<UInt32Value>

Limit the number of inbound PRIORITY frames allowed per each opened stream. If the number of PRIORITY frames received over the lifetime of connection exceeds the value calculated using this formula::

max_inbound_priority_frames_per_stream * (1 + opened_streams)

the connection is terminated. For downstream connections the opened_streams is incremented when Envoy receives complete response headers from the upstream server. For upstream connection the opened_streams is incremented when Envoy send the HEADERS frame for a new stream. The http2.inbound_priority_frames_flood stat tracks the number of connections terminated due to flood mitigation. The default limit is 100.

§max_inbound_window_update_frames_per_data_frame_sent: Option<UInt32Value>

Limit the number of inbound WINDOW_UPDATE frames allowed per DATA frame sent. If the number of WINDOW_UPDATE frames received over the lifetime of connection exceeds the value calculated using this formula::

5 + 2 * (opened_streams + max_inbound_window_update_frames_per_data_frame_sent * outbound_data_frames)

the connection is terminated. For downstream connections the opened_streams is incremented when Envoy receives complete response headers from the upstream server. For upstream connections the opened_streams is incremented when Envoy sends the HEADERS frame for a new stream. The http2.inbound_priority_frames_flood stat tracks the number of connections terminated due to flood mitigation. The default max_inbound_window_update_frames_per_data_frame_sent value is 10. Setting this to 1 should be enough to support HTTP/2 implementations with basic flow control, but more complex implementations that try to estimate available bandwidth require at least 2.

§stream_error_on_invalid_http_messaging: bool
👎Deprecated

Allows invalid HTTP messaging and headers. When this option is disabled (default), then the whole HTTP/2 connection is terminated upon receiving invalid HEADERS frame. However, when this option is enabled, only the offending stream is terminated.

This is overridden by HCM :ref:stream_error_on_invalid_http_messaging <envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.stream_error_on_invalid_http_message> iff present.

This is deprecated in favor of :ref:override_stream_error_on_invalid_http_message <envoy_v3_api_field_config.core.v3.Http2ProtocolOptions.override_stream_error_on_invalid_http_message>

See RFC7540, sec. 8.1 <<https://tools.ietf.org/html/rfc7540#section-8.1>_> for details.

§override_stream_error_on_invalid_http_message: Option<BoolValue>

Allows invalid HTTP messaging and headers. When this option is disabled (default), then the whole HTTP/2 connection is terminated upon receiving invalid HEADERS frame. However, when this option is enabled, only the offending stream is terminated.

This overrides any HCM :ref:stream_error_on_invalid_http_messaging <envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.stream_error_on_invalid_http_message>

See RFC7540, sec. 8.1 <<https://tools.ietf.org/html/rfc7540#section-8.1>_> for details.

§custom_settings_parameters: Vec<SettingsParameter>

[#not-implemented-hide:] Specifies SETTINGS frame parameters to be sent to the peer, with two exceptions:

  1. SETTINGS_ENABLE_PUSH (0x2) is not configurable as HTTP/2 server push is not supported by Envoy.

  2. SETTINGS_ENABLE_CONNECT_PROTOCOL (0x8) is only configurable through the named field ‘allow_connect’.

Note that custom parameters specified through this field can not also be set in the corresponding named parameters:

.. code-block:: text

§ID Field Name

0x1 hpack_table_size 0x3 max_concurrent_streams 0x4 initial_stream_window_size

Collisions will trigger config validation failure on load/update. Likewise, inconsistencies between custom parameters with the same identifier will trigger a failure.

See IANA HTTP/2 Settings <<https://www.iana.org/assignments/http2-parameters/http2-parameters.xhtml#settings>_> for standardized identifiers.

§connection_keepalive: Option<KeepaliveSettings>

Send HTTP/2 PING frames to verify that the connection is still healthy. If the remote peer does not respond within the configured timeout, the connection will be aborted.

§use_oghttp2_codec: Option<BoolValue>

[#not-implemented-hide:] Hiding so that the field can be removed after oghttp2 is rolled out. If set, force use of a particular HTTP/2 codec: oghttp2 if true, nghttp2 if false. If unset, HTTP/2 codec is selected based on envoy.reloadable_features.http2_use_oghttp2.

Trait Implementations§

Source§

impl Clone for Http2ProtocolOptions

Source§

fn clone(&self) -> Http2ProtocolOptions

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Http2ProtocolOptions

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Http2ProtocolOptions

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Message for Http2ProtocolOptions

Source§

fn encoded_len(&self) -> usize

Returns the encoded length of the message without a length delimiter.
Source§

fn clear(&mut self)

Clears the message, resetting all fields to their default.
Source§

fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>
where Self: Sized,

Encodes the message to a buffer. Read more
Source§

fn encode_to_vec(&self) -> Vec<u8>
where Self: Sized,

Encodes the message to a newly allocated buffer.
Source§

fn encode_length_delimited( &self, buf: &mut impl BufMut, ) -> Result<(), EncodeError>
where Self: Sized,

Encodes the message with a length-delimiter to a buffer. Read more
Source§

fn encode_length_delimited_to_vec(&self) -> Vec<u8>
where Self: Sized,

Encodes the message with a length-delimiter to a newly allocated buffer.
Source§

fn decode(buf: impl Buf) -> Result<Self, DecodeError>
where Self: Default,

Decodes an instance of the message from a buffer. Read more
Source§

fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>
where Self: Default,

Decodes a length-delimited instance of the message from the buffer.
Source§

fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>
where Self: Sized,

Decodes an instance of the message from a buffer, and merges it into self. Read more
Source§

fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>
where Self: Sized,

Decodes a length-delimited instance of the message from buffer, and merges it into self.
Source§

impl Name for Http2ProtocolOptions

Source§

const NAME: &'static str = "Http2ProtocolOptions"

Simple name for this Message. This name is the same as it appears in the source .proto file, e.g. FooBar.
Source§

const PACKAGE: &'static str = "envoy.config.core.v3"

Package name this message type is contained in. They are domain-like and delimited by ., e.g. google.protobuf.
Source§

fn full_name() -> String

Fully-qualified unique name for this Message. It’s prefixed with the package name and names of any parent messages, e.g. google.rpc.BadRequest.FieldViolation. By default, this is the package name followed by the message name. Fully-qualified names must be unique within a domain of Type URLs.
Source§

fn type_url() -> String

Type URL for this Message, which by default is the full name with a leading slash, but may also include a leading domain name, e.g. type.googleapis.com/google.profile.Person. This can be used when serializing into the google.protobuf.Any type.
Source§

impl PartialEq for Http2ProtocolOptions

Source§

fn eq(&self, other: &Http2ProtocolOptions) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for Http2ProtocolOptions

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoRequest<T> for T

Source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more