--- id: upstash/skills/upstash-ratelimit-js version: "fb7f2ff7" license: MIT install: manual updated: 2026-07-14 --- # upstash-ratelimit-js — This skill guides you through implementing rate limiting with Upstash's Redis-backed TypeScript/JavaScript SDK. Learn to install the SDK, connect to Redis, create a rate limiter, and apply it to incoming requests using sliding window or other algorithms. Publisher: upstash · Stars: 15 · Updated: 2026-07-14 Install (manual): `git clone https://github.com/upstash/skills` ## SKILL.md # Rate Limit TS SDK ## Quick Start - Install the SDK and connect to Redis. - Create a rate limiter and apply it to incoming operations. Example: ```ts import { Ratelimit } from "@upstash/ratelimit"; import { Redis } from "@upstash/redis"; const redis = new Redis({ url: "", token: "" }); const limiter = new Ratelimit({ redis, limiter: Ratelimit.slidingWindow(5, "10s") }); const { success } = await limiter.limit("user-id"); if (!success) { // throttled } ``` ## Other Skill Files - **algorithms.md**: Describes all available rate‑limiting algorithms and how they behave. - **pricing-cost.md**: Explains pricing, Redis cost implications, and operational considerations. - **features.md**: Lists SDK features such as prefixes, custom keys, and behavioral options. - **methods-getting-started.md**: Full method reference for the SDK's API and getting started guide. - **traffic-protection.md**: Guidance on applying rate limiting for traffic shaping, abuse prevention, and protection patterns. [View on SkillFed](https://skillfed.io/upstash/skills/upstash-ratelimit-js) · [View on GitHub](https://github.com/upstash/skills)