Upstash Documentation home page
Search...
⌘K
Ask AI
Discord
Blog
Twitter
Console
Console
Search...
Navigation
Ratelimit (TS)
Overview
Overview
Redis
Vector
QStash
Workflow
Search
Developer API
Overall
Quickstarts
Features
SDKs
Typescript
Python
Ratelimit (TS)
Overview
Getting Started
Methods
Features
Traffic Protection
Ratelimiting Algorithms
Costs
Integrations
Ratelimit (PY)
How To
Integrations
Tutorials
Troubleshooting
Help
On this page
Upstash Rate Limit
Quick Links:
Features
Examples
Ratelimit (TS)
Overview
Upstash Rate Limit
It is the only connectionless (HTTP based) rate limiting library and designed for:
Serverless functions (AWS Lambda, Vercel …)
Cloudflare Workers
Vercel Edge
Fastly Compute@Edge
Next.js, Jamstack …
Client side web/mobile applications
WebAssembly
and other environments where HTTP is preferred over TCP.
Quick Links:
Github Repository
Getting Started
Costs
Features
Caching
Handle blocked requests without having to call your Redis Database
Timeout
If the Redis call of the ratelimit is not resolved in some timeframe, allow the request by default
Analytics & Dashboard
Collect information on which identifiers made how many requests and how many were blocked
Traffic Protection
Create a deny list to block requests based on user agents, countries, IP addresses and more
Custom Rates
Consume different amounts of tokens in different requests (example: limiting based on request/response size)
Multi Region
Utilize several Redis databases in different regions to serve users faster
Multiple Limits
Use different limits for different kinds of requests (example: paid and free users)
For more information about the features, see the
Features tab
.
Examples
Nextjs
Rate limit an API in a Nextjs project
Nextjs with Middleware
Rate limit an API with a Middleware in a Nextjs project
Vercel Edge
Rate limit an Vercel Edge Function
Enabling Protection
Use Deny Lists to Protect Your Website
Cloudflare Pages
Rate limit access to your Cloudflare Pages app
Cloudflare Workers
Rate limit access to your Cloudflare Workers
Remix
Rate limit access to a Remix App
Rate limit using Vercel KV
Rate limit a Nexjs app using Vercel KV
Deno App
Rate limit your deno app
Rate limit your Chatbot
Limiting requests to a Chatbot endpoint which streams LLM outputs
Was this page helpful?
Yes
No
Suggest edits
Raise issue
STRLEN
Getting Started
Assistant
Responses are generated using AI and may contain mistakes.