.NET Architecture & System Design Interview Question #136

What is rate limiting?

Resilience, Rate Limiting, Health Checks & Observability Senior Advanced

Quick Interview Answer

Rate limiting controls how many requests or operations are accepted during a period or under a concurrency limit. It protects services from overload, abusive clients, accidental loops, and expensive traffic spikes.

Detailed Explanation

Rate limiting controls how many requests or operations are accepted during a period or under a concurrency limit. It protects services from overload, abusive clients, accidental loops, and expensive traffic spikes.

Limits can be global, per user, per API key, per tenant, or per endpoint. A good design also communicates rejection clearly, commonly with HTTP 429 and retry guidance when appropriate.

Code Example

Client -> Rate Limiter -> API
             |
        limit exceeded
             |
          HTTP 429