Code a token-bucket rate limiter
Medium · Coding (typed)
Write a rate limiter that allows each user up to 10 requests per second with bursts of up to 20. Implement allow(userId) → true/false. Then explain what changes when the API runs on several servers.
Create a free account to answer it and get scored on what a strong answer covers.