| title | Acme Widget API — Rate Limiting Rollout | |||
|---|---|---|---|---|
| type | session | |||
| date | 2026-06-12 | |||
| author | Jane Doe + Claude (Sonnet 5) | |||
| status | active | |||
| confidence | verified | |||
| tags |
|
|||
| related |
Added per-key rate limiting to the public API using a Redis token bucket, and fixed the 500 error that was happening when Redis was unreachable (it now fails open instead of crashing the request).
flowchart LR
A[Client Request] --> B[RateLimitMiddleware]
B --> C{Redis reachable?}
C -->|Yes| D[Check token bucket]
C -->|No| E[Fail open, log warning]
D -->|Under limit| F[Handler]
D -->|Over limit| G[429 Too Many Requests]
E --> F
%% Generated 2026-06-12 from: src/middleware/rate_limit.py
- Rate Limiting — created (new feature doc)
| Hash | Message |
|---|---|
| a1b2c3d | feat: add Redis token bucket rate limiter |
| e4f5g6h | fix: fail open when Redis is unreachable |
[None beyond what's captured in the feature doc.]
- Fail-open beats fail-closed for non-critical infra dependencies: a rate limiter that crashes the request when its backing store is down is worse than one that lets the request through unrestricted — the failure mode should match what the feature protects against, not just "throw." — Confidence: 8/10
- Add per-key limit overrides for enterprise customers
- Dashboard for current rate-limit hit rates
[None.]