API / Microservices Design Patterns Interview Questions
What is the Throttling pattern and how does it differ from Rate Limiting?
Both Throttling and Rate Limiting control the flow of requests to protect a service from overload, but they differ in what they do to excess traffic.
| Aspect | Rate Limiting | Throttling |
|---|---|---|
| What happens to excess requests | Rejected immediately — HTTP 429 returned | Slowed down, queued, or delayed — response takes longer |
| Client experience | Hard error; client must back off and retry | Slower response; client waits longer but eventually receives a response |
| Use case | Enforcing hard quotas per client (API monetisation, abuse prevention) | Graceful degradation under peak load; ensuring critical traffic is served first |
| Implementation | Counter/token check before processing | Priority queue, token bucket drain with delay, or thread pool queue with bounded size |
In practice, throttling often applies to internal flows — for example, a batch processing service that reads from a database throttles its own read rate to avoid saturating the DB connection pool. Rate limiting is more commonly applied at the external boundary (API gateway) to control client behaviour.
A service can apply both simultaneously: rate limit external clients to prevent abuse (hard cap), while internally throttling its own outbound calls to downstream services (graceful slowdown) to stay within those services' capacity. Throttling at the outbound call level also prevents the Retry storm anti-pattern, where many retries overload a recovering downstream service.
Invest now in Acorns!!! 🚀
Join Acorns and get your $5 bonus!
Acorns is a micro-investing app that automatically invests your "spare change" from daily purchases into diversified, expert-built portfolios of ETFs. It is designed for beginners, allowing you to start investing with as little as $5. The service automates saving and investing. Disclosure: I may receive a referral bonus.
Invest now!!! Get Free equity stock (US, UK only)!
Use Robinhood app to invest in stocks. It is safe and secure. Use the Referral link to claim your free stock when you sign up!.
The Robinhood app makes it easy to trade stocks, crypto and more.
Webull! Receive free stock by signing up using the link: Webull signup.
More Related questions...
