Auth rate-limiting
Overview
Add per-IP rate limiting to the authentication service so a single client cannot exhaust the login endpoint. This is the demo plan for the multi-user review loop.
Approach
- Token bucket per client IP
- Redis-backed counters shared across nodes
- Return HTTP 429 when the bucket is empty
Risks
- Redis outage: fail open or fail closed?
- Distributed clock skew across nodes
Decision
Use a sliding window over fixed one-second buckets, refilled at a steady rate.

