Rate limiting.Done right.
TypeScript rate limiting with multiple strategies,
storage engines and resilience policies.
TypeScript rate limiting with multiple strategies,
storage engines and resilience policies.
Scale from local isolate state to HTTP-native Upstash Redis, TCP Redis, or PostgreSQL. Swap storage backends by changing a single package import.
In-memory Maps, zero dependencies
Atomic Lua script pipeline execution
HTTP-native Redis for Edge functions
Isolated transactional UPSERT queries
RateLock encapsulates the host-specific database driver logic inside the engine packages. Your core limiters, validation hooks, API configurations, and resilience policies remain 100% unchanged.
A rate limiter should stay robust when your database is under load or temporarily unreachable. RateLock includes built-in policies like retries, circuit breakers, and local memory caching to help you handle transient errors gracefully.
Why saturate your databases checking blacklisted IPs? RateLock caches repeatedly blocked requests in local memory, instantly rejecting malicious spikes in `0.02ms` without making a single network call.
Avoid thread pool saturation when your databases fail. RateLock automatically halts queries, redirects calls to fail-safes, and probes recovery periodically.
Configure your limiters with custom fallback policies to guarantee that rate limit operations never throw runtime exceptions to clients during database hiccups.
Choose how to handle rate limiting exceptions during extreme database congestion or downtime. Swap behaviors dynamically without rewriting controller logics.
Interactive rate limiting simulation running entirely in your browser. Send requests, adjust parameters, and watch the limits in action.
Dedicated middlewares for pipeline frameworks, step-by-step guides for web-standard ones. Same limiters, same resilience policies, everywhere.
Hard, reproducible numbers from the same matrix and code paths on every supported backend. Below: throughput vs. the most popular Node.js rate-limiters, and how the deny cache shields your storage layer from abuse.
The withCache decorator stores blocked keys in a local, short-lived cache. Subsequent requests fail immediately in memory, preventing network round-trips to your database.
Explore latency, throughput and memory profiles for every benchmarked backend shipped with RateLock, plus the exact scripts we used to measure them.