upstash-ratelimit-js

tarafından upstash

Upstash Redis RateLimit TypeScript/JavaScript SDK'sini kullanmak için hafif rehberlik, kurulum adımları, temel kullanım ve gelişmiş algoritma işaretçileri dahil,…

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.

upstash tarafından daha fazla skill

context7-docs
upstash
Fetch up-to-date documentation and code examples for any library, framework, SDK, CLI tool, or cloud service. Use whenever the user asks about a specific…
official
context7-mcp
upstash
Bu beceri, kullanıcı kütüphaneler, çerçeveler, API referansları hakkında soru sorduğunda veya kod örneklerine ihtiyaç duyduğunda kullanılmalıdır. Kurulum soruları, kod… için etkinleşir.
official
ctx7-cli
upstash
ctx7 CLI'yi kullanarak kütüphane dokümantasyonunu getir, AI kodlama becerilerini yönet ve Context7 MCP'yi yapılandır. Kullanıcı "ctx7" veya "context7"den bahsettiğinde etkinleşir,…
official
docs
upstash
Herhangi bir programlama kütüphanesi veya çerçevesi için Context7'den güncel dokümantasyon ve kod örnekleri alır ve sorgular. Bağlı olduğu kod yazarken kullanılır…
official
documentation-lookup
upstash
Eğitim verilerine güvenmek yerine güncel kütüphane dokümantasyonunu ve kod örneklerini getirir. Kütüphane adlarını Context7 dokümantasyon kimliklerine çözümler, ardından kurulum, yapılandırma ve API referans bilgilerini sorgular. React, Vue, Svelte, Next.js, Express, Prisma, Supabase, Tailwind ve diğer büyük framework ve kütüphaneleri destekler. Kurulum soruları, kod oluşturma istekleri ve framework'e özgü sorgular için otomatik olarak etkinleşir. Sürüm bilincine sahip dokümantasyon ve resmi kod döndürür...
official
find-docs
upstash
Herhangi bir kütüphane için Context7 CLI kullanarak güncel dokümantasyon ve kod örneklerini alır.
official
redis-js
upstash
Upstash Redis JavaScript/TypeScript SDK'si ile sunucusuz Redis işlemleri gerçekleştirin. Önbellekleme, oturum depolama, hız sınırlama, lider tabloları, tam metin…
official
upstash-search-js
upstash
Upstash Search hızlı başlangıç kılavuzları, temel kavramlar ve TypeScript SDK kullanımını kapsayan dokümantasyon becerileri için giriş noktası. Bir kullanıcı nasıl başlayacağını sorduğunda kullanın,…
official