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.

  1. In API Keys and Traffic Management, select the API throttling tab.

  2. Click + or Create a new counter to create a throttling counter.

  3. 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.

  4. From the Access control group list, select the access control group that you want to associate with the counter.

  5. In the Throttling limit per second field, enter the allowed number of requests per second.
    Enter the maximum number of requests that can go through an edge server within one second.

  6. In the Counter notes field, enter meaningful notes about the counter for future reference, and click Save.

  7. Configure throttling rate settings:

    1. Optionally, in the Throttling limit per second field, adjust the maximum number of requests that can go through an edge server within one second.
    2. 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 80% for this counter. 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 a 429 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.
  8. Add alerting to your behavior to be notified when 80% of the throttling limit value 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.

    1. Click Add Alert to create an alert configuration.
    2. In the Alert name field, enter a meaningful name for the alert.
    3. In the Emails field, enter the internal email addresses to send the alert to. Internal email addresses end with akamai.com.
    4. To view your alert configuration and history of its occurrence in the ​Control Center​ Alerts application, click ... > View in alerting app.
  9. Optionally, in the Error response customization section, customize the error response.

    1. 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.
    2. Add status code, message body, and headers.
  10. In the Throttling headers section, select the response headers to return to the origin or API client.

HeaderDescription
X-Throttling-LimitThe requests-per-second limit set for a throttling counter.
X-Throttling-RateThe current rate which throttling is handling in the current second.
  1. From the Add condition menu, 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.

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.

  1. In API Keys and Traffic Management, select the API throttling tab.

  2. Clik the counter you want to delete.

  3. Click the ... menu next to the Help link, and click Delete a throttling counter.

  4. In the confirmation window, click Yes.