Rate Limiting
Infrastructure for
Modern APIs.
Sub-millisecond decisions powered by atomic Redis Lua scripts. Sliding window, token bucket, multi-tenant isolation. Drop it in front of any API.
$ curl -X POST https://api.cerberus.dev/v1/check \-H "X-API-Key: cerb_abc123..." \-d '{"key": "user:42", "policy": "api-default"}'# Response 200 OK 0.4ms{"allowed": true,"remaining": 97,"limit": 100,"reset_at": 1710100060}
Built for production.
Everything you need to enforce rate limits at scale, without building it from scratch.
Sub-Millisecond Checks
Atomic Lua scripts execute entirely within Redis. Single round-trip, zero race conditions. Typical latency under 800us.
Multiple Algorithms
Sliding window for smooth enforcement, token bucket for burst tolerance. Choose per endpoint, per policy.
Atomic Operations
All logic runs inside Redis via EVALSHA. No TOCTOU bugs, no distributed locks.
Tenant Isolation
Full multi-tenancy with API key auth. Each tenant gets isolated policies and namespaced keys.
Prometheus Metrics
Native metrics with pre-built Grafana dashboards. Track allowed/blocked ratios and latency percentiles.
Horizontally Scalable
Stateless API layer, shared Redis backend. Add replicas without coordination. Scale to millions.
Dynamic Policies
Create, update, delete rate limit policies at runtime. Changes propagate across all nodes instantly.
TTL-Bounded Memory
Every Redis key auto-expires. No background cleanup jobs, no memory leaks. Bounded by design.
Official SDKs
Python and TypeScript SDKs included. Standard rate-limit headers and RFC 7807 error responses.
Three lines to protect any API.
Drop in the SDK, configure a policy, and you're done.
1from cerberus import CerberusClient23client = CerberusClient(4 base_url="https://api.cerberus.dev",5 api_key="cerb_live_abc123..."6)78# Check if request should be allowed9result = client.check(10 key="user:42",11 policy="api-default"12)1314if not result.allowed:15 raise RateLimitExceeded(16 retry_after=result.retry_after17 )
Start free, scale when ready.
Open source and self-hostable. Or let us handle the infrastructure so you can focus on your product.
Open Source
Self-host on your own infrastructure with full source code access.
- Unlimited requests
- Sliding window + token bucket
- Redis-backed storage
- Prometheus metrics
- Docker deployment
- Community support
Pro
Managed service with guaranteed uptime and priority support.
- Everything in Open Source
- Managed Redis cluster
- 99.99% uptime SLA
- Dashboard & analytics
- Up to 10M checks/month
- Email support
- Custom policies
Enterprise
Dedicated infrastructure, custom SLAs, and hands-on engineering support.
- Everything in Pro
- Unlimited checks
- Dedicated Redis cluster
- Custom SLA
- SSO / SAML
- Priority support + Slack
- On-prem deployment
- Custom algorithms
Stop reinventing
rate limiting.
Every team ends up building it. It starts as a simple Redis counter, then becomes three sprints of plumbing. Let Cerberus handle it.