Bandwidth limit (proto)
This extension has the qualified name envoy.filters.http.bandwidth_limit
Note
This extension has an unknown security posture and should only be used in deployments where both the downstream and upstream are trusted.
Tip
This extension extends and can be used with the following extension category:
This extension must be configured with one of the following type URLs:
Bandwidth limit configuration overview.
extensions.filters.http.bandwidth_limit.v3.BandwidthLimit
[extensions.filters.http.bandwidth_limit.v3.BandwidthLimit proto]
{
"stat_prefix": ...,
"enable_mode": ...,
"limit_kbps": {...},
"fill_interval": {...},
"runtime_enabled": {...},
"enable_response_trailers": ...,
"response_trailer_prefix": ...
}
- stat_prefix
(string, REQUIRED) The human readable prefix to use when emitting stats.
- enable_mode
(extensions.filters.http.bandwidth_limit.v3.BandwidthLimit.EnableMode) The enable mode for the bandwidth limit filter. Default is Disabled.
- limit_kbps
(UInt64Value) The limit supplied in KiB/s.
Note
It’s fine for the limit to be unset for the global configuration since the bandwidth limit can be applied at a the virtual host or route level. Thus, the limit must be set for the per route configuration otherwise the config will be rejected.
Note
When using per route configuration, the limit becomes unique to that route.
- fill_interval
(Duration) Optional Fill interval in milliseconds for the token refills. Defaults to 50ms. It must be at least 20ms to avoid too aggressive refills.
- runtime_enabled
(config.core.v3.RuntimeFeatureFlag) Runtime flag that controls whether the filter is enabled or not. If not specified, defaults to enabled.
- enable_response_trailers
(bool) Enable response trailers.
Note
If set true, the following 4 trailers will be added, prefixed by
response_trailer_prefix
: * bandwidth-request-delay-ms: delay time in milliseconds it took for the request stream transfer including request body transfer time and the time added by the filter. * bandwidth-response-delay-ms: delay time in milliseconds it took for the response stream transfer including response body transfer time and the time added by the filter. * bandwidth-request-filter-delay-ms: delay time in milliseconds in request stream transfer added by the filter. * bandwidth-response-filter-delay-ms: delay time in milliseconds that added by the filter. If enable_mode isDISABLED
orREQUEST
, the trailers will not be set. If both the request and response delay time is 0, the trailers will not be set.
- response_trailer_prefix
(string) Optional The prefix for the response trailers.
Enum extensions.filters.http.bandwidth_limit.v3.BandwidthLimit.EnableMode
[extensions.filters.http.bandwidth_limit.v3.BandwidthLimit.EnableMode proto]
Defines the mode for the bandwidth limit filter. Values represent bitmask.
- DISABLED
(DEFAULT) Filter is disabled.
- REQUEST
Filter enabled only for incoming traffic.
- RESPONSE
Filter enabled only for outgoing traffic.
- REQUEST_AND_RESPONSE
Filter enabled for both incoming and outgoing traffic.