System Design
Rate Limiter
Limit API traffic per account while allowing short bursts.
easyPremium
"Design a rate limiter for a public API. Give each account its own request limit and allow short bursts."
A rate limiter checks an account's request allowance before a call reaches the API. It can allow a short burst while keeping the account's sustained traffic within its limit. When the allowance runs out, the service tells the client when to retry.