Protects services from being overwhelmed by too many requests
1. Token Bucket
- Bucket has a limit, and tokens are added at a fixed rate.
- When a request arrives, it must obtain a token from the bucket to proceed.
### 2. Leaky Bucket
- Requests enter the bucket from the top.
- The bucket processes ("leaks") requests at a constant rate through the hole.
### Fixed Window Counter
- Time is divided into fixed windows (ex: every 5 seconds)
- Each window has limit on request limit
Sliding Window
- Basically allow request timestamp between a timestamp on a window size
- Something like a dequeue basically based on req. timestamp