Rate Limiter Design

Design the limiter itself, not only its headers. Start from the failure being prevented (abuse, cost, fairness, downstream protection), key on the authenticated tenant plus an endpoint cost class, pick the algorithm (a fixed window admits up to 2x across a boundary; use a sliding-window counter or GCRA, a token bucket for legitimate bursts, a concurrency limit for a slow downstream), make check-and-decrement atomic using the store's clock, decide fail-open or closed, and roll out in shadow mode before enforcing. Use whenever someone says "add rate limiting to our API", "one customer is hammering us", "per-user limit across 12 pods" or "is our Redis rate limiter racy". Not for the 429 response contract (api-design), capacity-driven shedding regardless of caller (overload-protection), who may call (authorization-design).

greenblacked Updated
The twenty-nine plugins: coding, family, gamedev, operations, delivery, security, manager, personal, career, design, llm, data, techdocs, assurance, client-apps

File contents

greenblacked/AI commit 47db1bbfd8

Frequently asked questions

npx get-skill add greenblacked/rate-limiter-design