API-Based Throttling is used to limit the number of requests to a given API in a given time period.
When the number of messages defined by the API Based Throttling policy is reached, no new requests will be directed to the Backend API until the specified time is completed. Thus, it is prevented that the backend API is running on the server that causes more load than it can handle.
For example, if the total number of API requests is specified as 10/second (10 requests per second) and the number of messages exceeds 10 messages per second, the client will be returned with an error message stating that too many requests were made, along with the HTTP status code 403.
The picture below shows the policy settings:
The policy fields are shown in the table below.
Field
Description
Description
An optional description of the policy that may be useful for usage and management activities.
Apply by
A variable can be selected for this policy to work over a certain variable.
It is optional.
Message Count
It is the maximum number of messages that can be sent to the Backend API within the time given by the Throttling Interval.
Interval Time Amount
The numeric value specifying the duration of the throttling window in the chosen time unit.
Interval Time Unit
The time unit (e.g., seconds, minutes) used to define the throttling window for API request limits.
Interval Window Type
The time interval method used for API rate limiting (fixed or sliding).
The timeout duration for the cache connection is specified.
Action for Cache Connection Error
Specifies the action to be taken if the policy has a connection problem with the cache server.
You can visit thePoliciespage for the details of theConditionsandError Message Customizationpanels.