Updated on 2024-01-05 GMT+08:00

General Procedure

Assume that you have the following request throttling requirements for an API:

  1. The API can be called up to 10 times per 60s but can be called by a user only 5 times per 60s.
  2. Only 10 requests containing header field Host=www.abc.com are allowed in 60s.
  3. Only 10 requests with method GET and path reqPath = /list are allowed in 60s.
  4. Only 10 requests with path reqPath = /fc are allowed in 60s.
  5. Each excluded tenant can only call the API 5 times per 60s.

Following this procedure to create a request throttling 2.0 policy and bind it to an API.

  1. Create a policy.

    Enter the basic information of the request throttling 2.0 policy.

  2. Configure basic throttling.

    Configure the basic throttling settings.

  3. Configure parameter-based throttling.

    Enable parameter-based throttling, and define parameters and rules.

  4. Configure excluded throttling.

    Enable excluded throttling, and configure excluded tenants and credentials.

  5. Bind the policy to an API.

    Bind the request throttling 2.0 policy to the API.

  6. Verify the API.

    Call the API and verify whether the request throttling 2.0 policy has taken effect.