Manage throttling counter
You can either create a new throttling counters or delete those already exisiting.
Create 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.
API
You can also complete this task by using the API Keys and Traffic Management API. Run the Create a throttling counter operation.
-
In API Keys and Traffic Management, select the API throttling tab.
-
Click + to create a throttling counter.
-
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 Counter notes field, enter meaningful notes about the counter for future reference, and click Save.
-
Configure throttling rate settings:
- Optionally, in the Throttling limit field, enter the maximum number of requests that can go through the entire Akamai edge network within one second.
- 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 all requests to reach your origin.
For this behavior, it is required to configure alerting to receive notifications when the throttling limit reaches the percentage value you define for this counter. By default, it’s 80%. See the next step in this procedure. - Select Deny to reject the requests that exceed the throttling limit for this counter.
If the request count reaches the defined limit, API Gateway rejects any excessive requests with a429
response until the moving average for this throttling counter diminishes to the set threshold, and additional alerts may be sent if configured. This usually takes up to ten seconds. - In the Alert threshold field define the percentage of the threshold between 70-98%. By default, it’s 80%. When the number of requests reaches the threshold, you receive an alert by email.
- Select Warn to allow all requests to reach your origin.
-
Add alerting to your behavior to be notified when the percentage of the throttling threshold you defined is reached. Alert is required for the Warn behavior, and optional for Deny.
You can also complete this task by using the OPEN API. See Create throttling counter alert through Open API.
- Click Add Alert to create an alert configuration.
- In the Alert name field, enter a meaningful name for the alert.
- In the Emails field, enter the internal email addresses to send the alert to. Internal email addresses end with akamai.com.
- To view your alert configuration and history of its occurrence in the Control Center Alerts application, click ... > View in alerting app.
-
In the Throttling headers section, select the response headers to return to the origin or API client.
Header | Description |
---|---|
X-Throttling-Limit | The requests-per-second limit set for a throttling counter. |
X-Throttling-Rate | The current rate which throttling is handling in the current second. |
-
Optionally, in the Error response customization section, customize the error response.
- Enable Override default response for the error message that will be sent to client in case of limit violation. If you don't customize error response, the alert message is sill sent.
- Add status code, message body, and headers.
-
In the Throttling conditions section, add one or multiple rules to specify conditions for throttling and save.
If you create a counter but don't add any rules to it, the throttling has no effect.
Update a throttling counter
To update a throttling counter select the API throttling tab in API Keys and Traffic Management and choose the counter you want to edit. You can change all the data apart from Access control group.
API
You can also complete this task by using the API Keys and Traffic Management API. Run the Edit a throttling counter operation.
Delete a throttling counter
If you no longer want a throttling counter with specific conditions to increase when requests that match the conditions reach your APIs, you may delete the throttling counter.
API
You can also complete this task by using the API Keys and Traffic Management API. Run the Delete a throttling counter operation.
-
In API Keys and Traffic Management, select the API throttling tab.
-
Clik the counter you want to delete.
-
Click the ... menu next to the Help link, and click Delete a throttling counter.
-
In the confirmation window, click Yes.
Updated 10 days ago