Define a throttling counter
In the API throttling panel of API Keys and Traffic Management, you can set up throttling counters for specific sets of input conditions that incoming requests will match. In other words, you set up match criteria that determine whether a specific request increments the counter and applies toward the moving average threshold set for that counter.
- In API Keys and Traffic Management, select the API throttling tab.
- Click the plus sign to create a throttling counter.
- Set the Enable this counter switch to Yes.
In the Counter name
field, enter a meaningful name for the counter.
For example, if you are creating a counter that limits requests to a particular registered API, you can use the name of this API to name the counter.
- From the Access control group list, select the access control group that you want to associate with the counter.
In the Requests per
second field, enter the allowed number of requests per
This value indicates the maximum allowed number of requests matching the associated throttling conditions per second. If the request count reaches the defined limit, API Gateway rejects any excessive requests with a 429 response until the moving average for this throttling counter diminishes to the set threshold. This usually takes up to ten seconds.
In the When limit is
reached field, select the preferred API Gateway behavior when
the throttling counter reaches its requests-per-second limit.
Select Warn to allow the requests above 80% of the throttling limit for this counter to still reach your origin and configure throttling headers to provide information about the limit. Select Deny to reject the requests that exceed the throttling limit for this counter.
Do one of these steps:
If... Then... If you selected Warn, then do these steps:
Tip: You can click the ellipsis icon and select the View in alerting app option to view your alert configuration and history of its occurrence in the Alerts application in Control Center.
- Click Add Alert to create an alert configuration
- In Alert name, enter a meaningful name for the alert.
- In Emails, enter the internal email addresses to
send the alert to.
Internal email addresses end with akamai.com.
For more information on the API Gateway throttling limit alert, see Alerts.
If you selected Deny, then move on to the next step.
- In the Counter notes field, enter meaningful notes about the counter for future reference.
In the Throttling headers section, select the response
headers to return to the origin or API client.
Throttling limit response headers Header Description X-Throttling-Limit The requests-per-second limit set for a throttling counter. X-Throttling-Rate The remaining requests available in the current second.