Framework-Neutral Guard
Call check() directly in any runtime, or wrap middleware() for Express-compatible request flows.
Shape bursts, share counters, and expose predictable retry metadata with Memory, Redis, cache-hub atomic backends, four algorithms, and Express-style middleware.
Call check() directly in any runtime, or wrap middleware() for Express-compatible request flows.
Sliding window, fixed window, token bucket, and leaky bucket cover fairness, burst capacity, and smoothing needs.
Start with in-process Memory, then move to Redis or CacheHubStore when counters must be shared across instances.
Close owned Redis clients and cache-hub cleanup resources with await limiter.close().
Keep IP allowlist authorization separate from route quotas, with global and route-level configuration patterns.
Memory, Redis direct, HTTP middleware, and OSS comparison data are documented with commands and environment.