IBM Support

Rate Limit calculation at Plan level

Question & Answer


Question

How is the Rate Limit calculated when applied at Plan level? Is the Rate Limit shared across all API Operations in the Plan?

Answer

Applying a Rate Limit at the Plan level creates a default rate limit that is shared across all the operations within the Plan. When the rate limit is exceeded, and if Hard Limit is enabled, all subsequent API calls will be rejected.
Example:
In this example, I have created:
  • APIs :  demo-rate-limit-api and demo-rate-limit-2-api
  • Product :  demo-rate-limit-product
I have created Bronze Plan in the demo-rate-limit-product, which includes:
  • Rate Limit of 5 calls per minute, I have enabled Hard Limit so it will reject the calls after the specified Rate Limit is reached.
  • Both APIs have a total of 4 operations.
Screenshots:
plan rate limit
plan apis
YAML files for the example are in this zip file: demo-rate-limit-example.zip .
Testing the Example:
I have created an App  and subscribed to the Bronze Plan in the product, submitted a batch of 2 iterations, in each iteration all four operations are invoked. After the 5th successful invocation, subsequent requests will be rejected with the message:
{
    "httpCode": "429",
    "httpMessage": "Too Many Requests",
    "moreInformation": "Rate Limit exceeded"
}
test

      [{"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"SSMNED","label":"IBM API Connect"},"Component":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"v2018","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

      Document Information

      Modified date:
      03 January 2020

      UID

      ibm11128651