You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, there. Thank you for providing such a simple and useful library.
There are some configuration options confuse me. What do 'Rate' and 'Burst' mean? How can I modify them to achieve the effect of 'maximum 2 times per 10 minutes'?
Hope to add some explanatory comments.
The text was updated successfully, but these errors were encountered:
Nomango
changed the title
Rate and Brust configuration items are not clear
Rate and Brust configurations are not clear
Nov 29, 2023
Nomango
changed the title
Rate and Brust configurations are not clear
Rate and Burst configurations are not clear
Nov 29, 2023
It seems the "Leaky Bucket" algorithm is being used. Burst is the bucket size, Rate is the bucket's throughput (leak rate = Rate/Period).
The "Leaky Bucket" algorithm represents a model where incoming requests are added to a bucket from which they leak out at a constant rate, ensuring a steady and predictable flow of request processing. The bucket size determines the maximum number of requests that can be temporarily accumulated, allowing the system to handle short-term load spikes. This algorithm is used to prevent system overload and ensure even load distribution by discarding requests if the bucket is full.
To answer your question: if you don't need to account for load spikes, you can do it like this:
Thus, no accumulation of requests will occur, the first request will be allowed immediately, and the next one approximately 5 minutes later (10 minutes / 2).
Hi, there. Thank you for providing such a simple and useful library.
There are some configuration options confuse me. What do 'Rate' and 'Burst' mean? How can I modify them to achieve the effect of 'maximum 2 times per 10 minutes'?
Hope to add some explanatory comments.
The text was updated successfully, but these errors were encountered: