Drop-in SDK middleware. Redis-powered. Sub-millisecond decisions at any scale.
const result = await throttlr.check({ rule: 'api-requests', identifier: req.user.id,})
if (!result.allowed) { return res.status(429).json({ error: 'Too many requests', retryAfter: result.resetAt, })}{ "allowed": true, "remaining": 87, "limit": 100, "algorithm": "SLIDING_WINDOW", "resetAt": "in 42s"}Every rate limit check runs inside Redis via an atomic Lua script — race-condition safe, no round trips, no overhead.
Choose the algorithm that fits your use case. Fixed Window for simplicity, Sliding Window for precision traffic control.
Install @throttlr/sdk, pass your API key, call throttlr.check(). Your endpoint is protected in under a minute.
Throttlr asynchronously logs every check to PostgreSQL — identifier, rule, allowed status, count. Charts included in your dashboard.
Six steps. Under one millisecond.
await throttlr.check({
rule: 'api-requests',
identifier: req.user.id,
})Your backend calls the SDK with a rule name and an identifier — a user ID, IP address, or any string that identifies the caller.
Every request logged. Every decision tracked.
| Identifier | Rule | Status | Count | Time |
|---|
Drop-in SDK middleware. Redis-powered. Deploy in minutes.