Tiered rate limiter with limits that change at runtime

0
Remix

Build a rate-limiting service in Python. Each client belongs to a tier (for example free, pro, enterprise), and each tier has its own limit. A request arrives with a client id, and the service decides whether to allow it under that client's tier.

  1. Implement the limiter and its interface.
  2. Let an operator change a tier's limits while the service runs, without a restart, and define what happens to clients mid-window.
  3. Write tests for it.
  4. Discuss how you would scale it beyond one process: shared state, accuracy versus latency, and failure behavior.
SnowflakeTechnical phone screenLast asked Aug 2026
No answer yet. Write the first one; the best answer gets endorsed.