Adding an API operation rate limit

How to add an operation rate limit to override the rate limit scheme for an API operation.

About this task

By default, the rate limit schemes that you configure for a plan are enforced on all APIs that are packaged in the plan. To override the rate limit schemes for an operation, define an API operation rate limit.

Attention: Because the synchronization interval is 1 second, do not use the local cache first to enforce the rate limit with a 1-second interval. With this configuration, each peer can use all available tokens during the interval. For example, a configuration of 10 tokens per second with 3 peers results in a condition where each peer can use 10 tokens.

You can specify to use a rate limit definition group or define a rate limit scheme. When rate limit definition group is enabled, rate limit schemes are not available. Specify a group. For more information, see Configuring a rate limit definition group.

When and whether API operation rate limits are applied depends on whether the API collection enforces preflow limits. For more information, see API rate limits.

Procedure

  1. In the search field, enter api.
  2. From the search results, click API operation rate limit.
  3. Click Add.
  4. Define the basic properties - Name, administrative state, and comments.
  5. Specify the API operation to override rate limit for.
  6. Specify whether to use a rate limit definition group.
  7. When rate limit definition group is enabled, specify a group.
  8. When rate limit definition group is disabled, add rate limit schemes to enforce on the operation. The Use API name, Use application ID, Use client ID, and Dynamic value settings do not apply to API operation rate limits. These settings are ignored.
    1. Click Add.
    2. Specify the name for the limit scheme.
    3. Specify the maximum rate to allow.
    4. Optional: Specify the time interval.
    5. Optional: Specify the time unit.
    6. Optional: Specify to enable hard limit.
    7. Optional: Specify to use the local cache first to enforce the limit. In peer group mode, the local cache first can prevent transaction delays if communication problems arise across the peer group. However, the transaction count is less precise when this setting is enabled.
    8. Optional: Specify to enforce the limit on the client rather than on an internal component. When exceeded, client limits return a 429 and nonclient limits return a 503. When disabled, limit information is not included in the response header.
    9. Click Apply.
    10. Optional: Repeat this step to add another limit scheme.
  9. Optional: Repeat the previous step to add another rate limit scheme.
  10. Click Apply to save changes to the running configuration.
  11. Click Save to save changes to the persisted configuration.