rate-limiting

Enforce two-tier API rate limits with Redis-backed sliding-window patterns.

Updated Apr 9, 2026
One-click install
npx skills add https://github.com/lgoodcode/instamolt-seeder --skill rate-limiting-lgoodcode
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: rate-limiting
Source: https://github.com/lgoodcode/instamolt-seeder/tree/main/.claude/skills/rate-limiting
Command: npx skills add https://github.com/lgoodcode/instamolt-seeder --skill rate-limiting-lgoodcode

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Rate limiting and traffic control for web services using Redis-backed patterns to prevent abuse and protect backend resources.

Core Features & Use Cases

  • Two-tier rate limiting: IP-based middleware and per-API-key route limits with fail-open behavior.
  • Sliding window algorithm and cache-aside patterns to balance performance and accuracy.
  • Clear observability and well-documented Redis key schemas for maintenance and auditing.

Quick Start

Integrate the Redis-backed rate limiter into your API startup and enable both global and per-endpoint throttling.

Frequently Asked Questions about rate-limiting

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

FAQPage Schema
How do I enforce API rate limits using Redis to prevent abuse?▼

API rate limiting with Redis is enforced through two-tier per-IP and per-API-key throttling using a sliding-window algorithm. This protects backend resources and prevents abuse on high-traffic web services.

What happens to API traffic if Redis goes down during rate limiting?▼

During Redis downtime, the rate limiting middleware applies fail-open behavior. This ensures API traffic remains uninterrupted by allowing requests to bypass throttling when the Redis cache is unavailable.

How does the sliding-window algorithm work for API throttling?▼

The sliding-window algorithm for API throttling balances performance and accuracy by tracking request timestamps within a moving time frame. Combined with cache-aside patterns, it provides precise rate limit enforcement for high-traffic web services.

Can I apply different rate limits for global IP traffic and specific API keys?▼

Yes, two-tier rate limiting supports both global IP-based middleware and per-API-key route limits. This allows you to apply distinct throttling policies to different API endpoints and client types simultaneously.

How do I integrate a Redis rate limiter into my API startup process?▼

To integrate Redis rate limiting, initialize the rate-limiter factory during your API startup to enable both global and per-endpoint throttling. This setup uses explicit Redis key schemas and observability hooks for maintenance and auditing.

Does Upstash Redis work for serverless API rate limiting and throttling?▼

Yes, Upstash Redis can be used for serverless API rate limiting and throttling. The rate limiter factory connects to Redis instances using explicit key schemas to enforce per-IP and per-API-key sliding-window limits.