Rate Limiter Service
Token bucket, sliding window and leaky bucket, in-memory and Redis-backed — fifteen ways the production version of each quietly breaks.
Nobody has started this yet — be first.
Backlog
6 tickets- bugL1 · Fix a bug
Token bucket denies a request that exactly matches remaining tokens
Token bucket backs the pro-tier plan and any small-capacity policy (e.g. "1 password reset email per key at a time"). Losing the last unit of every configured burst means paying customers systematically get less throughput than the plan they bought -- worse for small capacities, where "capacity 1" effectively means "always denied." It shows up as support tickets from customers who have made zero real requests, and is easy to ship unnoticed because manual testing usually checks "does it deny eventually," not "does it admit exactly N."
10xp - bugL1 · Fix a bug
Leaky bucket fills instead of draining
This algorithm guards login-brute-force-guard -- the login page, the single most trafficked, most first-impression-critical path in the product. A bug that turns a temporary slow-down into a permanent lockout means any legitimate user who ever tried logging in 5 times in a row (a mistyped password, a shared office IP) is locked out forever, with no recovery except an operator restarting the whole service -- which resets everyone's state, not just theirs. It reads to customers as "the login page is broken" and can look like a full outage even though every other system is healthy.
10xp - enhancementL2 · Implement a feature
Add request-ID correlation
Every minute spent by support or on-call figuring out which server-side log line matches this customer's complaint is a minute the customer waits for an answer. Without request-ID correlation, that matching is done by eyeballing timestamps and hoping nothing else happened in the same window -- it gets worse as traffic grows, right when you can least afford slow incident response.
15xp - bugL1 · Fix a bug
X-Forwarded-For trusts the wrong (spoofable) hop
Rate limiting exists to protect the business from abuse -- credential stuffing, scraping, a single bad actor consuming disproportionate infrastructure cost. A key-derivation bug that lets an attacker pick a fresh "identity" per request defeats that protection entirely for every rule keyed by IP. This is a security control that looks like it's working (dashboards look normal, denials happen) while silently protecting against nothing -- exactly the kind of gap that shows up in a security audit or an incident postmortem.
15xp - enhancementL2 · Implement a feature
Add an admin endpoint to reset a key's limiter state
"A customer got wrongly throttled" is a routine support request -- shared office IPs, a retry storm, a bug on the customer's side that looked like abuse from ours. Today the only remediation is "wait it out" or "restart the service" (which resets every customer's state, not just theirs). An operator-facing reset endpoint turns a multi-team escalation into a 30-second fix.
30xp - bugL1 · Fix a bug
Janitor evicts active keys almost immediately
Rate-limit tiers are how the product enforces its pricing model and how infrastructure cost stays bounded under abuse. If configured state resets far more often than IDLE_TTL promises, free-tier usage stops being meaningfully capped. Because this bug produces more allowed traffic rather than errors, it is one of the quietest possible failures to notice -- nothing looks broken from the outside, the bill or the abuse just creeps up.
15xp
About this project
What you're working in
A production-shaped rate limiter, as a Go library and as a runnable HTTP service: token bucket, sliding window counter, and leaky bucket, each with an in-memory and a Redis-backed implementation behind one clean Limiter interface. The three algorithms trade off differently (burst tolerance vs. predictable quotas vs. hard shaping), and the two backends trade off differently too (in-memory is free but per-replica, Redis is shared but adds a network hop) — swapping either one never touches a call site.
Eight tickets are bugs deliberately injected into an otherwise-working codebase (an off-by-one, a sign flip, a lock released too early, a Redis/Lua boolean gotcha that panics on every denial); seven are enhancements that do not exist yet, each with a compile-only stub so the codebase and the verification tests build before the real implementation is written. Every ticket has a dedicated Go test that goes green when the fix is correct.