• Similar to the token bucket algorithm, except that the requests are processed at a fixed rate.
  • Implemented with a first-in-first-out (FIFO) queue

How it works?

Leaking bucket algorithm working

Pros and Cons

Pros

  • Memory efficient due to the limited queue size
  • Suitable for cases where stable processing rate is desired

Cons

  • Not suitable for a burst of traffic
  • Difficult to tune the two parameters: Bucket size, Outflow rate

Sources