Design a Rate Limiter (Practical)
Problem
Implement an API rate limiter (token bucket or sliding window) for a REST API, with per-user limits and rate-limit response headers.
Example
5000 requests/hour per user; return remaining + reset headers
Constraints
- Concurrent requests per user must be counted correctly
added …