@@ -56,7 +56,7 @@ message QuicKeepAliveSettings {
5656}
5757
5858// QUIC protocol options which apply to both downstream and upstream connections.
59- // [#next-free-field: 9 ]
59+ // [#next-free-field: 10 ]
6060message QuicProtocolOptions {
6161 // Maximum number of streams that the client can negotiate per connection. 100
6262 // if not specified.
@@ -111,6 +111,10 @@ message QuicProtocolOptions {
111111 lte {seconds : 600 }
112112 gte {seconds : 1 }
113113 }];
114+
115+ // Maximum packet length for QUIC connections. It refers to the largest size of a QUIC packet that can be transmitted over the connection.
116+ // If not specified, one of the `default values in QUICHE <https://github.com/google/quiche/blob/main/quiche/quic/core/quic_constants.h>`_ is used.
117+ google.protobuf.UInt64Value max_packet_length = 9 ;
114118}
115119
116120message UpstreamHttpProtocolOptions {
@@ -205,7 +209,7 @@ message AlternateProtocolsCacheOptions {
205209 repeated string canonical_suffixes = 5 ;
206210}
207211
208- // [#next-free-field: 7 ]
212+ // [#next-free-field: 8 ]
209213message HttpProtocolOptions {
210214 option (udpa.annotations.versioning ).previous_message_type =
211215 "envoy.api.v2.core.HttpProtocolOptions" ;
@@ -255,11 +259,31 @@ message HttpProtocolOptions {
255259 // <envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.drain_timeout>`.
256260 google.protobuf.Duration max_connection_duration = 3 ;
257261
258- // The maximum number of headers. If unconfigured, the default
259- // maximum number of request headers allowed is 100. Requests that exceed this limit will receive
260- // a 431 response for HTTP/1.x and cause a stream reset for HTTP/2.
262+ // The maximum number of headers (request headers if configured on HttpConnectionManager,
263+ // response headers when configured on a cluster).
264+ // If unconfigured, the default maximum number of headers allowed is 100.
265+ // The default value for requests can be overridden by setting runtime key ``envoy.reloadable_features.max_request_headers_count``.
266+ // The default value for responses can be overridden by setting runtime key ``envoy.reloadable_features.max_response_headers_count``.
267+ // Downstream requests that exceed this limit will receive a 431 response for HTTP/1.x and cause a stream
268+ // reset for HTTP/2.
269+ // Upstream responses that exceed this limit will result in a 503 response.
261270 google.protobuf.UInt32Value max_headers_count = 2 [(validate.rules ).uint32 = {gte : 1 }];
262271
272+ // The maximum size of response headers.
273+ // If unconfigured, the default is 60 KiB, except for HTTP/1 response headers which have a default
274+ // of 80KiB.
275+ // The default value can be overridden by setting runtime key ``envoy.reloadable_features.max_response_headers_size_kb``.
276+ // Responses that exceed this limit will result in a 503 response.
277+ // In Envoy, this setting is only valid when configured on an upstream cluster, not on the
278+ // :ref:`HTTP Connection Manager
279+ // <envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.common_http_protocol_options>`.
280+ //
281+ // Note: currently some protocol codecs impose limits on the maximum size of a single header:
282+ // HTTP/2 (when using nghttp2) limits a single header to around 100kb.
283+ // HTTP/3 limits a single header to around 1024kb.
284+ google.protobuf.UInt32Value max_response_headers_kb = 7
285+ [(validate.rules ).uint32 = {lte : 8192 gt : 0 }];
286+
263287 // Total duration to keep alive an HTTP request/response stream. If the time limit is reached the stream will be
264288 // reset independent of any other timeouts. If not specified, this value is not set.
265289 google.protobuf.Duration max_stream_duration = 4 ;
0 commit comments