Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[EDU-6113] - AI Documentation update - 2025-01-24 - upstash rate limiting integration #1472

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ With this integration, based on an edge function, you can define:

Upstash Rate Limiting is integrated with the `upstash/ratelimit` library and provides a global accounting of the rate limit, summing up all the requests received across the entire network, instead of counting separately for each edge location.

:::note
**Important:** Azion does not develop custom functions. Users must create their own solutions or submit feature requests if they require additional functionalities such as randomized idle time in rate limiting.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
**Important:** Azion does not develop custom functions. Users must create their own solutions or submit feature requests if they require additional functionalities such as randomized idle time in rate limiting.
Azion doesn't develop custom functions. Users must create their own solutions or submit feature requests if they require additional functionalities such as randomized idle time in rate limiting.

:::

---

## Requirements
Expand Down Expand Up @@ -133,26 +137,26 @@ While still on the **Edge Firewall** page:
"rate_limit_repenalize": true,
"rate_limits": [
{
"algorithm": "sliding_window",
"requests": 2,
"interval": "20 s",
"start": "00:00",
"end": "12:00",
"penalty_in_seconds": 45
"algorithm": "sliding_window",
"requests": 2,
"interval": "20 s",
"start": "00:00",
"end": "12:00",
"penalty_in_seconds": 45
},
{
"algorithm": "fixed_window",
"requests": 3,
"interval": "120 s",
"start": "12:01",
"end": "23:00",
"algorithm": "fixed_window",
"requests": 3,
"interval": "120 s",
"start": "12:01",
"end": "23:00",

},
{
"algorithm": "token_bucket",
"refil_rate": 5,
"max_tokens": 5,
"interval": "10 s",
"algorithm": "token_bucket",
"refil_rate": 5,
"max_tokens": 5,
"interval": "10 s",
"start": "23:01",
"penalty_in_seconds": 55
}
Expand Down Expand Up @@ -214,26 +218,26 @@ This action will load the function, showing a form with the function's source-co
"rate_limit_repenalize": true,
"rate_limits": [
{
"algorithm": "sliding_window",
"requests": 2,
"interval": "20 s",
"start": "00:00",
"end": "12:00",
"penalty_in_seconds": 45
"algorithm": "sliding_window",
"requests": 2,
"interval": "20 s",
"start": "00:00",
"end": "12:00",
"penalty_in_seconds": 45
},
{
"algorithm": "fixed_window",
"requests": 3,
"interval": "120 s",
"start": "12:01",
"end": "23:00",
"algorithm": "fixed_window",
"requests": 3,
"interval": "120 s",
"start": "12:01",
"end": "23:00",

},
{
"algorithm": "token_bucket",
"refil_rate": 5,
"max_tokens": 5,
"interval": "10 s",
"algorithm": "token_bucket",
"refil_rate": 5,
"max_tokens": 5,
"interval": "10 s",
"start": "23:01",
"penalty_in_seconds": 55
}
Expand Down Expand Up @@ -288,9 +292,9 @@ Example:

```bash
"algorithm": "token_bucket",
"refil_rate": 5,
"max_tokens": 5,
"interval": "10 s",
"refil_rate": 5,
"max_tokens": 5,
"interval": "10 s",
"start": "23:01",
"penalty_in_seconds": 55
```
Expand Down Expand Up @@ -347,4 +351,4 @@ Done. Now **Upstash Rate Limiting** is running and protecting your domains.

Discover how to enhance your web application's performance with this tutorial on **Rate Limit with Penalty on Azion + Upstash DB**. Watch now on Azion's YouTube channel.

<iframe width="560" height="315" src="https://www.youtube.com/embed/3qsiKK2GzRw?si=Em23FF2i1BHzTV7r" loading="lazy" title="How to install Upstash Rate Limiting integration through Azion Marketplace" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>
<iframe width="560" height="315" src="https://www.youtube.com/embed/3qsiKK2GzRw?si=Em23FF2i1BHzTV7r" loading="lazy" title="How to install Upstash Rate Limiting integration through Azion Marketplace" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>