route config: Allow to configure direct response body size (#14778)

This patch adds max_direct_response_body_size_bytes to set the maximum bytes of the direct response body size (in bytes). The config is added as a field in RouteConfiguration.

Reviving #13487 with a slightly different approach (add the config to RouteConfiguration instead of directly per direct response config entry).

Risk Level: Low, since the default behavior is preserved.
Testing: Updated to test the newly introduced config.
Docs Changes: Updated.
Release Notes: Added.
Fixes #13422

Signed-off-by: Dhi Aurrahman <dio@rockybars.com>

Mirrored from https://github.com/envoyproxy/envoy @ eeb7adc3a30456f0d4ac65e5e6c8e88e25481d2a
pull/624/head
data-plane-api(Azure Pipelines) 4 years ago
parent 625fe87137
commit 7951082c50
  1. 15
      envoy/config/route/v3/route.proto
  2. 15
      envoy/config/route/v4alpha/route.proto

@ -21,7 +21,7 @@ option (udpa.annotations.file_status).package_version_status = ACTIVE;
// * Routing :ref:`architecture overview <arch_overview_http_routing>`
// * HTTP :ref:`router filter <config_http_filters_router>`
// [#next-free-field: 11]
// [#next-free-field: 12]
message RouteConfiguration {
option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.RouteConfiguration";
@ -106,6 +106,19 @@ message RouteConfiguration {
// option. Users may wish to override the default behavior in certain cases (for example when
// using CDS with a static route table).
google.protobuf.BoolValue validate_clusters = 7;
// The maximum bytes of the response :ref:`direct response body
// <envoy_api_field_config.route.v3.DirectResponseAction.body>` size. If not specified the default
// is 4096.
//
// .. warning::
//
// Envoy currently holds the content of :ref:`direct response body
// <envoy_api_field_config.route.v3.DirectResponseAction.body>` in memory. Be careful setting
// this to be larger than the default 4KB, since the allocated memory for direct response body
// is not subject to data plane buffering controls.
//
google.protobuf.UInt32Value max_direct_response_body_size_bytes = 11;
}
message Vhds {

@ -21,7 +21,7 @@ option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSIO
// * Routing :ref:`architecture overview <arch_overview_http_routing>`
// * HTTP :ref:`router filter <config_http_filters_router>`
// [#next-free-field: 11]
// [#next-free-field: 12]
message RouteConfiguration {
option (udpa.annotations.versioning).previous_message_type =
"envoy.config.route.v3.RouteConfiguration";
@ -107,6 +107,19 @@ message RouteConfiguration {
// option. Users may wish to override the default behavior in certain cases (for example when
// using CDS with a static route table).
google.protobuf.BoolValue validate_clusters = 7;
// The maximum bytes of the response :ref:`direct response body
// <envoy_api_field_config.route.v4alpha.DirectResponseAction.body>` size. If not specified the default
// is 4096.
//
// .. warning::
//
// Envoy currently holds the content of :ref:`direct response body
// <envoy_api_field_config.route.v4alpha.DirectResponseAction.body>` in memory. Be careful setting
// this to be larger than the default 4KB, since the allocated memory for direct response body
// is not subject to data plane buffering controls.
//
google.protobuf.UInt32Value max_direct_response_body_size_bytes = 11;
}
message Vhds {

Loading…
Cancel
Save