A rate limiter is a tool that controls the rate of requests or operations performed by a user, service, or API within a specific time window.
- API Protection: Prevent abuse and DoS attacks
- Resource Management: Ensure fair usage of system resources
- Cost Control: Limit usage to stay within service quotas
- Service Stability: Prevent system overload
- Fixed Window
- Sliding Window
- Token Bucket
- Rate limit should be configurable
- Different rate limits for different users/plan/endpoints