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 + 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. From the counters list, select your counter.

  8. 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 that almost reached the throttling limit (80%) for this counter to still reach your origin and create alerts to send in case of each such request
    • 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. This usually takes up to ten seconds.
  9. If you selected Warn:

    1. Click Add Alert to create an alert configuration.
    2. In Alert name, enter a meaningful name for the alert.
    3. In Emails, enter the internal email addresses to send the alert to. Internal email addresses end with akamai.com.

👍

Click ... > View in alerting app to view your alert configuration and history of its occurrence in the ​Control Center​ Alerts application.

  1. If you selected Deny, optionally enable Override default response in the Error response customization section 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. 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. 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. Click ... > Delete a throttling counter.

  3. In the confirmation window, click Yes.