Token Bucket Rate Limiter

medium~30 min

Design a token bucket rate limiter that allows an average of N requests per second but tolerates short bursts. Explain how tokens are added and consumed, and what happens when a request arrives with no tokens available.

Solution

This one has no written solution — the answer is your own story or your own submission.