InterviewStack.io LogoInterviewStack.io

Rate Limiting, Throttling and Quota Management Questions

Protecting API capacity and enforcing fair use: rate-limiting algorithms (token bucket, leaky bucket, fixed/sliding window), per-client quotas, throttling responses (429 semantics, Retry-After), and tiered plan enforcement. Covers where to enforce limits (gateway vs. service), distributed counters, and graceful degradation under load.

HardTechnical
90 practiced

Implement a thread-safe in-memory rate limiter that supports token-bucket and leaky-bucket algorithms. Requirements: per-key limits, a global fallback limit, high concurrency (many goroutines), and low latency. Provide a Go implementation with appropriate locking or sharding and describe trade-offs between algorithms.

MediumTechnical
80 practiced

Implement a token-bucket rate limiter in your preferred language (Go or Python). Requirements: allow bursts up to bucket capacity and replenish tokens at a configured rate; expose allow_request() that returns true/false. Include concurrency considerations and how you'd persist/coordinate the limiter across multiple application instances for global rate limits.

MediumSystem Design
80 practiced

Design a throttling strategy for a public REST API to protect backend services during sudden traffic spikes. Include per-user rate limits, global rate limits, burst handling, token-bucket vs leaky-bucket trade-offs, how to signal clients about throttling, and how to roll out and monitor the policy to avoid surprising customers.

That is every published Rate Limiting, Throttling and Quota Management question for Site Reliability Engineer (SRE) so far. Browse the other topics in this category, or practice this one interactively.