Rate limit

    If the rate limit service is called, and the response for any of the descriptors is over limit, a 429 response is returned.

    Attention

    This section is written for the v1 API but the concepts also apply to the v2 API. It will be rewritten to target the v2 API in a future release.

    Each on the route or virtual host populates a descriptor entry. A vector of descriptor entries compose a descriptor. To create more complex rate limit descriptors, actions can be composed in any order. The descriptor will be populated in the order the actions are specified in the configuration.

    For example, to generate the following descriptor:

    Example 2

    If an action doesn’t append a descriptor entry, no descriptor is generated for the configuration.

    For the following configuration:

    If a request did not set x-forwarded-for, no descriptor is generated.

    If a request sets , the the following descriptor is generated:

    The buffer filter outputs statistics in the cluster..ratelimit. namespace. 429 responses are emitted to the normal cluster dynamic HTTP statistics.

    ratelimit.http_filter_enabled

    % of requests that will call the rate limit service. Defaults to 100.

    ratelimit.http_filter_enforcing

    % of requests that will call the rate limit service and enforce the decision. Defaults to 100. This can be used to test what would happen before fully enforcing the outcome.

    ratelimit..http_filter_enabled