Skip to main content

Rate Limit Request Examples

With Traffic Policy, you can rate limit requests to your endpoints based on a variety of criteria. This page demonstrates a few example rules that do so.

See the rate-limit Traffic Policy action docs for more information.

By endpoint

This rule applies rate limiting of 30 requests per second to the endpoint /api/videos.

Loading…

Based on authentication status

This rule creates a lower rate limit for unauthenticated (likely free) users, while allowing authenticated users a higher level of capacity.

Loading…

Based on pricing tiers

Using a naming scheme in your upstream servers with API calls using a tier header, you can quickly customize access to your API based on any number of pricing tiers.

This rule checks for a Tier header in the request and applies rate limiting based on the value of that header.

Loading…