Logo

Protects services from being overwhelmed by too many requests

1. Token Bucket

Pasted image 20241029165458.png

  • 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

Pasted image 20241029171243.png

  1. Requests enter the bucket from the top.
  2. The bucket processes ("leaks") requests at a constant rate through the hole.

### Fixed Window Counter

Pasted image 20241029171536.png

  1. Time is divided into fixed windows (ex: every 5 seconds)
  2. Each window has limit on request limit

Sliding Window

Pasted image 20241029171649.png

  • Basically allow request timestamp between a timestamp on a window size
  • Something like a dequeue basically based on req. timestamp

© 2025 All rights reservedBuilt with DataHub Cloud

Built with LogoDataHub Cloud