upstash-ratelimit-js

Provides guidance for rate limiting with the Redis-based Turbolimit TypeScript/JavaScript SDK.

17|2|Updated Mar 24, 2026
One-click install
npx skills add https://github.com/upstash/skills --skill upstash-ratelimit-js
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: upstash-ratelimit-js
Source: https://github.com/upstash/skills/tree/main/skills/upstash-ratelimit-js
Command: npx skills add https://github.com/upstash/skills --skill upstash-ratelimit-js

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Provides concise, practical guidance for using the Upstash Redis RateLimit TypeScript/JavaScript SDK, covering setup, basic usage, and pointers to advanced documentation.

Core Features & Use Cases

  • Quick setup examples for common rate-limiting patterns (single-region and multi-region, fixedWindow, slidingWindow, tokenBucket)
  • Guidance on features like dynamic limits, analytics, caches, and deny lists
  • Real-world usage scenarios such as protecting APIs and throttling user actions.

Quick Start

Create a Redis client, instantiate a Ratelimit with a slidingWindow limiter, and call limit to gate a user action.

Frequently Asked Questions about upstash-ratelimit-js

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement rate limiting in a TypeScript or JavaScript application?

Implement rate limiting in TypeScript or JavaScript by instantiating a Ratelimit object with an Upstash Redis client and calling the limit method to gate user actions using algorithms like slidingWindow.

What rate limiting algorithms are available for protecting APIs in JS?

Available rate limiting algorithms for protecting APIs include fixed window, sliding window, and token bucket, which can be deployed across single-region and multi-region environments using the Upstash Redis SDK.

Does Upstash rate limiting support multi-region and edge deployments?

Upstash rate limiting supports multi-region and edge deployments, providing practical usage examples to throttle user actions and protect resources across various server and edge environments.

Can I apply dynamic limits and deny lists when throttling user actions?

You can apply dynamic limits and deny lists when throttling user actions, utilizing SDK features to customize resource protection and manage access control beyond standard rate limiting patterns.

What is the best way to set up a sliding window rate limiter with Redis?

The best way to set up a sliding window rate limiter with Redis is to create an Upstash client, instantiate a Ratelimit object specifying the slidingWindow algorithm, and apply it to gate per-identifier requests.