Rate Limit

This interceptor defines the maximum amount of requests that are allowed in a given time span (which can be a second, minute, hour, day or month) and it may be entered in the API flow or directly in the flow of a plan.

In the case of an API, the interceptor can be inserted at the level of the API as a whole, of a resource or of an operation. In all these cases, each request will increment the total rate regardless of the caller, and respecting the interval defined. If it is added to the flow of a Plan, it will increase the specific rate of the caller (app or access token). In both cases, a new header showing the number of requests remaining may be added.

It’s easy to confuse this interceptor with another one that controls traffic, Spike Arrest. Because of this, we’ve included a more thorough description of each of them, their differences and configuration examples here.


rate limit

The interceptor can only be inserted into the request flow. To configure it, we have to fill in some properties, as shown in the image above.

  • Configuration type: Sets the type of configuration to be used by the interceptor, of which we have 2 options.

    • Total calls: Sets the interceptor by the total number of calls.

    • IP: Configures the interceptor by IP calls, allowing you to block repeated calls from the same IP.

  • Calls: The total number of accepted calls.

  • Interval: Sets the time interval in which calls will be accepted, it can be per second, minute, hour, day, week or month.

  • Soft Limit: Lets you set an additional percentage of allowed calls by checking the option and adding the value in the % field to the right.

  • Return quota header: If checked, a parameter with the number of remaining requests will be sent with the response header.

In the example image, we set a limit of 300 calls per minute, with a 30% soft limit allowed. That means that up to 90 more calls will be accepted.

If Soft Limit is checked, the % field becomes mandatory. Otherwise, the Rate Limit will function normally, based on the set quota amount on the Calls field.
Thanks for your feedback!

Share your suggestions with us!
Click here and then [+ Submit idea]