Essential session storage is required to sign in. Optional analytics remain off unless you allow them.
Implement a rate-limiting service (any language): a token-bucket and/or sliding-window algorithm, per-key limits enforced in shared state (Redis) so they hold across replicas, correct 429 + Retry-After responses, and a small load test that drives it past the limit. Document the algorithm choice and what it trades off.
Token bucket / sliding window implemented correctly; bursts bounded, sustained rate enforced.
Limits hold across replicas via atomic shared state (e.g. Redis INCR+EXPIRE), not per-process memory.
Returns 429 + Retry-After; limits configurable per key/window with sane defaults.
A burst load test shows the limiter holds; results and the trade-off are documented.
Use this README structure to make the work reviewable.
DevPath fetches a read-only, size-capped snapshot. Submitted code is never executed.
# Rate limiter as a service ## Goal Implement a rate-limiting service (any language): a token-bucket and/or sliding-window algorithm, per-key limits enforced in shared state (Redis) so they hold across replicas, correct 429 + Retry-After responses, and a small load test that drives it past the limit. Document the algorithm choice and what it trades off. ## Acceptance criteria - [ ] Algorithm correctness: Token bucket / sliding window implemented correctly; bursts bounded, sustained rate enforced. - [ ] Shared, atomic state: Limits hold across replicas via atomic shared state (e.g. Redis INCR+EXPIRE), not per-process memory. - [ ] Protocol correctness: Returns 429 + Retry-After; limits configurable per key/window with sane defaults. - [ ] Load demonstration: A burst load test shows the limiter holds; results and the trade-off are documented. ## Verification - [ ] Document installation and run commands. - [ ] Record automated checks and their exact commands. - [ ] Add representative output, screenshots, or a short demo where useful. - [ ] Confirm failure paths and known constraints. ## Decision log ### Decision title - Context: - Choice: - Alternatives considered: - Tradeoffs: ## Evidence - Link each rubric criterion to the file, test, or artifact that demonstrates it. ## Known limitations - List what is intentionally out of scope and what should be improved next.