Closed lherman-cs closed 6 months ago
The current implementation is not quite representing "NumPerSecond" as it allows the following sequence:
Burst -> sleep 1s -> Burst -> ...
During the "Burst" time, the load rate can exceed "NumPerSecond" as long as the join can be completed under the "NumPerSecond" interval.
rate.NewLimiter can be configured to allow burst as needed. We would need to restructure the code and allow a new parameter to define the burst.
rate.NewLimiter
The current implementation is not quite representing "NumPerSecond" as it allows the following sequence:
During the "Burst" time, the load rate can exceed "NumPerSecond" as long as the join can be completed under the "NumPerSecond" interval.
rate.NewLimiter
can be configured to allow burst as needed. We would need to restructure the code and allow a new parameter to define the burst.