Question presented to candidate: "People use 'throttling' and 'rate limiting' as if they were the same thing. If you had to tell them apart for your team, what would you say? What happens to a request over the limit in each case, and when would you choose one over the other?"
What a strong answer should cover:
- The useful distinction is what happens to excess traffic: a rate limiter rejects it (HTTP 429 Too Many Requests, ideally with Retry-After), a throttle delays or slows it (queue, pace, degrade) so it still completes later
- Both enforce a rate; they differ in who carries the cost: rejection pushes the waiting to the client (retries), throttling pushes it onto the server (held requests, memory, added latency)
- A throttle still needs a bound: an unbounded queue only turns overload into timeouts, so a throttle rejects once its queue is full
- The same algorithm can do either: a token or leaky bucket can drop the excess or schedule it (nginx
limit_reqdelays excess up toburstand rejects beyond it) - The words are used loosely: AWS API Gateway calls its 429 rejections "throttling", so define your terms in the room
- Related ideas: client-side throttling (the caller paces itself), backpressure, load shedding
Code / implementation expected: Optional β the example runs the same burst through a rejecting limiter and a delaying throttle and compares what clients see.