Bandwidth limit

This extension may be referenced by 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:

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 response trailers bandwidth-request-delay-ms and bandwidth-response-delay-ms will be added, prefixed by response_trailer_prefix.

  • bandwidth-request-delay-ms: delay time in milliseconds it took for the request stream transfer.

  • bandwidth-response-delay-ms: delay time in milliseconds it took for the response stream transfer.

  • If enable_mode is DISABLED or REQUEST, 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.