upstash-ratelimit-js

Leichte Anleitung zur Verwendung des Upstash Redis RateLimit TypeScript/JavaScript SDK, einschließlich Einrichtungsschritten, grundlegender Nutzung und Hinweisen zu erweiterten Algorithmen, …

npx skills add https://github.com/upstash/skills --skill upstash-ratelimit-js

Rate Limit TS SDK

Quick Start

  • Install the SDK and connect to Redis.
  • Create a rate limiter and apply it to incoming operations.

Example:

import { Ratelimit } from "@upstash/ratelimit";
import { Redis } from "@upstash/redis";

const redis = new Redis({ url: "<url>", token: "<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.

Mehr Skills von upstash

context7-cli
upstash
Verwende die ctx7 CLI, um Bibliotheksdokumentationen abzurufen, KI-Codierungsfähigkeiten zu verwalten und Context7 MCP zu konfigurieren. Aktiviere, wenn der Benutzer "ctx7" oder "context7" erwähnt,…
official
context7-mcp
upstash
Diese Fähigkeit sollte verwendet werden, wenn der Benutzer nach Bibliotheken, Frameworks, API-Referenzen fragt oder Codebeispiele benötigt. Aktiviert für Einrichtungsfragen, Code…
official
documentation-lookup
upstash
Diese Fähigkeit sollte verwendet werden, wenn der Benutzer nach Bibliotheken, Frameworks, API-Referenzen fragt oder Codebeispiele benötigt. Aktiviert für Setup-Fragen, Code…
official
find-docs
upstash
Rufe aktuelle Dokumentation und Codebeispiele für jede Bibliothek mit der Context7 CLI ab.
official
context7-cli
upstash
Verwende die ctx7 CLI, um Bibliotheksdokumentationen abzurufen, KI-Codierungsfähigkeiten zu verwalten und Context7 MCP zu konfigurieren. Aktiviere, wenn der Benutzer "ctx7" oder "context7" erwähnt,…
official
context7-docs-lookup
upstash
Nutze Context7, um aktuelle Bibliotheksdokumentationen abzurufen. Wird aktiviert, wenn der Benutzer nach Bibliotheken, Frameworks, API-Referenzen fragt oder Codebeispiele benötigt —…
official
context7-mcp
upstash
Diese Fähigkeit sollte verwendet werden, wenn der Benutzer nach Bibliotheken, Frameworks, API-Referenzen fragt oder Codebeispiele benötigt. Aktiviert für Einrichtungsfragen, Code…
official
ctx7-cli
upstash
Verwende die ctx7 CLI, um Bibliotheksdokumentation abzurufen, KI-Codierungsfähigkeiten zu verwalten und Context7 MCP zu konfigurieren. Aktiviere, wenn der Benutzer "ctx7" oder "context7" erwähnt,…
official