-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
10d27ff
commit 5f6a9b6
Showing
3 changed files
with
30 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
--- | ||
title: Rate Limit Requests Examples | ||
sidebar_label: Rate Limit Requests | ||
--- | ||
|
||
import { RateLimit } from "/traffic-policy/gallery/RateLimit.tsx"; | ||
import { RateLimitAuthentication } from "/traffic-policy/gallery/RateLimitAuthentication.tsx"; | ||
import { RateLimitPricing } from "/traffic-policy/gallery/RateLimitPricing.tsx"; | ||
|
||
With Traffic Policy, you can rate limit requests to your endpoints based on a variety of criteria. | ||
|
||
## By endpoint | ||
|
||
The following example applies rate limiting of `30` requests per second to the endpoint | ||
`/api/videos`. | ||
|
||
<RateLimit /> | ||
|
||
## Based on authentication status | ||
|
||
The following example creates a lower rate limit for unauthenticated (likely free) users, while allowing authenticated users a higher level of capacity. | ||
|
||
<RateLimitAuthentication /> | ||
|
||
## Based on pricing tiers | ||
|
||
Using a naming scheme in your upstream servers, and API calls using a `tier` header, you can quickly customize access to your API based on any number of pricing tiers. | ||
|
||
<RateLimitPricing /> |