Rate limiting ensures that your application doesn't get more than a specified number of requests over time. It effectively helps to protect your API from overloading. For requests above the threshold, Kusk Gateway returns HTTP Too Many Requests error.
Kusk makes it easy to configure Rate Limiting, using the
rate_limit option in the
The example above allows only up to two requests per minute to be sent to the whole API.
You can also specify different rate-limiting settings for a specific operation or path. The following example shows rate limiting configuration for a specific operation:
See all available Rate Limiting configuration options in the Extension Reference.