Closed jakeng-grabtaxi closed 1 month ago
Hi there,
I was taking a look at this library after learning about how Netflix controls concurrency. I noticed that in DefaultListener.OnDropped, the sample is added to the window but the concurrency limit is not updated (https://github.com/platinummonkey/go-concurrency-limits/blob/master/limiter/default.go#L100). The limit seems to only be updated in DefaultListener.OnSuccess. Whereas in the Java equivalent, onDropped (https://github.com/Netflix/concurrency-limits/blob/master/concurrency-limits-core/src/main/java/com/netflix/concurrency/limits/limiter/AbstractLimiter.java#L116) updates both the window and the limit.
DefaultListener.OnDropped
DefaultListener.OnSuccess
onDropped
I was wondering whats the reason for this difference and could it potentially lead to a situation where if the error rate spikes rapidly, such that that all requests are failing that the limits will never get updated.
Thank you for this great library!
Hi @platinummonkey , gently bumping this. I am happy to provide a PR to change this, but I wanted to run it through you first. Thanks.
hey! Sorry definitely feel free to submit a PR anytime!
Hi there,
I was taking a look at this library after learning about how Netflix controls concurrency. I noticed that in
DefaultListener.OnDropped
, the sample is added to the window but the concurrency limit is not updated (https://github.com/platinummonkey/go-concurrency-limits/blob/master/limiter/default.go#L100). The limit seems to only be updated inDefaultListener.OnSuccess
. Whereas in the Java equivalent,onDropped
(https://github.com/Netflix/concurrency-limits/blob/master/concurrency-limits-core/src/main/java/com/netflix/concurrency/limits/limiter/AbstractLimiter.java#L116) updates both the window and the limit.I was wondering whats the reason for this difference and could it potentially lead to a situation where if the error rate spikes rapidly, such that that all requests are failing that the limits will never get updated.
Thank you for this great library!