Manual Chapter : API rate limiting: Assign a different server when quota exceeded
Applies To:Show Versions
- 15.0.1, 15.0.0
API rate limiting: Assign a different server when quota
This rate limiting example continues to build on the group-based quota enforcement use case. Instead of a simple fallback branch that sends an error response from the rate limiting configuration, the Gold tier can send requests that exceed the quota to a different server.
To develop this example, you need to
- Open the API rate limiting per-request policy developed for group-based quotas.
- In the visual policy editor, add an API Server Selection agent in the fallback branch of the Gold tier. In that agent, select the server to which to send the requests that exceed the Gold quota for users.
- Edit the API Rate Limiting agent in the Gold branch and change theResponsetoNone.
- The fallback server can be set up to mitigate quota enforcement failures.
Here is the example API rate limiting per-request policy that sends rate limiting failures to a different server.
How it works
- The Rate Limiting configuration specified in the Gold tier does not specify a response.
- Requests that exceed the Gold quota or spike arrest values are sent to the API server specified in the API Server Selection agent.