.. _envoy_v3_api_file_envoy/extensions/filters/http/ratelimit/v3/rate_limit.proto: Rate limit ========== .. _extension_envoy.filters.http.ratelimit: This extension may be referenced by the qualified name *envoy.filters.http.ratelimit* .. note:: This extension is intended to be robust against untrusted downstream traffic. It assumes that the upstream is trusted. Rate limit :ref:`configuration overview `. .. _envoy_v3_api_msg_extensions.filters.http.ratelimit.v3.RateLimit: extensions.filters.http.ratelimit.v3.RateLimit ---------------------------------------------- `[extensions.filters.http.ratelimit.v3.RateLimit proto] `_ .. code-block:: json { "domain": "...", "stage": "...", "request_type": "...", "timeout": "{...}", "failure_mode_deny": "...", "rate_limited_as_resource_exhausted": "...", "rate_limit_service": "{...}", "enable_x_ratelimit_headers": "..." } .. _envoy_v3_api_field_extensions.filters.http.ratelimit.v3.RateLimit.domain: domain (`string `_, *REQUIRED*) The rate limit domain to use when calling the rate limit service. .. _envoy_v3_api_field_extensions.filters.http.ratelimit.v3.RateLimit.stage: stage (`uint32 `_) Specifies the rate limit configurations to be applied with the same stage number. If not set, the default stage number is 0. .. note:: The filter supports a range of 0 - 10 inclusively for stage numbers. .. _envoy_v3_api_field_extensions.filters.http.ratelimit.v3.RateLimit.request_type: request_type (`string `_) The type of requests the filter should apply to. The supported types are *internal*, *external* or *both*. A request is considered internal if :ref:`x-envoy-internal` is set to true. If :ref:`x-envoy-internal` is not set or false, a request is considered external. The filter defaults to *both*, and it will apply to all request types. .. _envoy_v3_api_field_extensions.filters.http.ratelimit.v3.RateLimit.timeout: timeout (`Duration `_) The timeout in milliseconds for the rate limit service RPC. If not set, this defaults to 20ms. .. _envoy_v3_api_field_extensions.filters.http.ratelimit.v3.RateLimit.failure_mode_deny: failure_mode_deny (`bool `_) The filter's behaviour in case the rate limiting service does not respond back. When it is set to true, Envoy will not allow traffic in case of communication failure between rate limiting service and the proxy. Defaults to false. .. _envoy_v3_api_field_extensions.filters.http.ratelimit.v3.RateLimit.rate_limited_as_resource_exhausted: rate_limited_as_resource_exhausted (`bool `_) Specifies whether a `RESOURCE_EXHAUSTED` gRPC code must be returned instead of the default `UNAVAILABLE` gRPC code for a rate limited gRPC call. The HTTP code will be 200 for a gRPC response. .. _envoy_v3_api_field_extensions.filters.http.ratelimit.v3.RateLimit.rate_limit_service: rate_limit_service (:ref:`config.ratelimit.v3.RateLimitServiceConfig `, *REQUIRED*) Configuration for an external rate limit service provider. If not specified, any calls to the rate limit service will immediately return success. .. _envoy_v3_api_field_extensions.filters.http.ratelimit.v3.RateLimit.enable_x_ratelimit_headers: enable_x_ratelimit_headers (:ref:`extensions.filters.http.ratelimit.v3.RateLimit.XRateLimitHeadersRFCVersion `) Defines the standard version to use for X-RateLimit headers emitted by the filter: * ``X-RateLimit-Limit`` - indicates the request-quota associated to the client in the current time-window followed by the description of the quota policy. The values are returned by the rate limiting service in :ref:`current_limit` field. Example: `10, 10;w=1;name="per-ip", 1000;w=3600`. * ``X-RateLimit-Remaining`` - indicates the remaining requests in the current time-window. The values are returned by the rate limiting service in :ref:`limit_remaining` field. * ``X-RateLimit-Reset`` - indicates the number of seconds until reset of the current time-window. The values are returned by the rate limiting service in :ref:`duration_until_reset` field. In case rate limiting policy specifies more then one time window, the values above represent the window that is closest to reaching its limit. For more information about the headers specification see selected version of the `draft RFC `_. Disabled by default. .. _envoy_v3_api_enum_extensions.filters.http.ratelimit.v3.RateLimit.XRateLimitHeadersRFCVersion: Enum extensions.filters.http.ratelimit.v3.RateLimit.XRateLimitHeadersRFCVersion ------------------------------------------------------------------------------- `[extensions.filters.http.ratelimit.v3.RateLimit.XRateLimitHeadersRFCVersion proto] `_ Defines the version of the standard to use for X-RateLimit headers. .. _envoy_v3_api_enum_value_extensions.filters.http.ratelimit.v3.RateLimit.XRateLimitHeadersRFCVersion.OFF: OFF *(DEFAULT)* ⁣X-RateLimit headers disabled. .. _envoy_v3_api_enum_value_extensions.filters.http.ratelimit.v3.RateLimit.XRateLimitHeadersRFCVersion.DRAFT_VERSION_03: DRAFT_VERSION_03 ⁣Use `draft RFC Version 03 `_. .. _envoy_v3_api_msg_extensions.filters.http.ratelimit.v3.RateLimitPerRoute: extensions.filters.http.ratelimit.v3.RateLimitPerRoute ------------------------------------------------------ `[extensions.filters.http.ratelimit.v3.RateLimitPerRoute proto] `_ .. code-block:: json { "vh_rate_limits": "..." } .. _envoy_v3_api_field_extensions.filters.http.ratelimit.v3.RateLimitPerRoute.vh_rate_limits: vh_rate_limits (:ref:`extensions.filters.http.ratelimit.v3.RateLimitPerRoute.VhRateLimitsOptions `) Specifies if the rate limit filter should include the virtual host rate limits. .. _envoy_v3_api_enum_extensions.filters.http.ratelimit.v3.RateLimitPerRoute.VhRateLimitsOptions: Enum extensions.filters.http.ratelimit.v3.RateLimitPerRoute.VhRateLimitsOptions ------------------------------------------------------------------------------- `[extensions.filters.http.ratelimit.v3.RateLimitPerRoute.VhRateLimitsOptions proto] `_ .. _envoy_v3_api_enum_value_extensions.filters.http.ratelimit.v3.RateLimitPerRoute.VhRateLimitsOptions.OVERRIDE: OVERRIDE *(DEFAULT)* ⁣Use the virtual host rate limits unless the route has a rate limit policy. .. _envoy_v3_api_enum_value_extensions.filters.http.ratelimit.v3.RateLimitPerRoute.VhRateLimitsOptions.INCLUDE: INCLUDE ⁣Use the virtual host rate limits even if the route has a rate limit policy. .. _envoy_v3_api_enum_value_extensions.filters.http.ratelimit.v3.RateLimitPerRoute.VhRateLimitsOptions.IGNORE: IGNORE ⁣Ignore the virtual host rate limits even if the route does not have a rate limit policy.