Problem Statement
Which algorithm is a common, simple choice for API rate limiting?
Explanation
Leaky bucket smooths bursts to a steady drain. Fixed windows are simple but can burst on boundaries; add jitter or sliding windows to improve fairness.
Keep limits per user or token and surface headers so clients adapt.
Code Solution
SolutionRead Only
X-RateLimit-Remaining: 137
Practice Sets
This question appears in the following practice sets:
