High-performance rate limiting – Smyte Blog – Medium
The industry standard algorithm for rate limiting is called a token bucket, sometimes called a "leaky bucket". Each bucket has a string key and initially contains the maximum number of tokens. Every time an event occurs, you check if the bucket contains enough tokens and reduce the number of tokens in the bucket by the requested amount. After a period of time called the refill time, the number of tokens in the bucket is increased by the refill amount. Over time, these refills will fill up the bucket to the maximum number of tokens.
Read full article from High-performance rate limiting – Smyte Blog – Medium
No comments:
Post a Comment