StaffCoder
BA
Backend System DesignJava 25Python 3.13
2 modules · 8 challengesSign up
Module 2 of 2 · 4 challenges

Backend System Design Rate Limiting

Learners protect an API from abusive clients with per-key fixed-window and token-bucket limits, standard limit headers, and limiter state shared atomically across instances.
Finish every challenge, or complete the star challenge, to complete the module.

Challenges

4 challenges

Code Hosting API Token Limits

Sign up to unlock
—No data yetmedium
About this challenge

Rate-limit a code hosting platform's public API after authentication: one budget per user across all their tokens and a smaller one per anonymous IP, counted as a sliding window over a rolling hour, 429 before the handler runs, and a usage endpoint that reports limit, remaining and reset for free.

Solved in a browser IDE and graded by tests. Sign up to solve

Messenger OTP Sending Limits

Sign up to unlock
—No data yetmedium
About this challenge

Stop SMS pumping on a messaging app's one-time-password login with two token buckets, per normalised phone number and per IP, that never spend or send on rejection and report the tighter bucket in limit headers with an exact Retry-After.

Solved in a browser IDE and graded by tests. Sign up to solve

Photo App Login Attempt Limits

Sign up to unlock
—No data yetmedium
About this challenge

Move a photo app's failed-login counter into the shared database so five failures in fifteen minutes lock an account on every instance, a correct password clears it, restarts keep it, simultaneous guesses never slip past, and sign-in fails closed when the store is down.

Solved in a browser IDE and graded by tests. Sign up to solve

Maps API Plan Limits

STAR
Solving it completes the module
100%1 of 1 solvedmedium
About this challenge

Enforce a maps API's pricing plans across a cluster: per-key, per-route-group token buckets from the key's plan, IP limits for keyless calls, a rolling 24-hour geocoding quota, instant upgrades, shared atomic state that survives restarts, limit headers with Retry-After, and fail-closed 503 when the store is down.

Solved in a browser IDE and graded by tests. Sign up to solve

We use cookies that are necessary to run Staffcoder, and optional analytics cookies to see which pages get used. Analytics stays off unless you accept. Read our Cookie Policy.