Polly icon indicating copy to clipboard operation
Polly copied to clipboard

RateLimiter improvements: 60 requests per minute, is not 1 request per second

Open danbopes opened this issue 3 years ago • 0 comments

Is your feature request related to a specific problem? Or an existing feature? Please describe. See: https://github.com/App-vNext/Polly/issues/936

Describe your proposed or preferred solution: If I'm given 60 requests per minute, that equates to 1 request per second. It's not 1 request per second, it's 60 requests per minute. If I queue up 500 requests, 60 should execute (Let's say these take 5 seconds), and then all future requests should throw RateLimitRejectedException with a 55 second retry after. Setting the burst window to 60, doesn't result in the same behavior.

Proposed Solution: Add other rate limiter engine that supports a true "If I'm allocated this many executions, I'll try to execute as many as possible, as soon as I can".

danbopes avatar Apr 16 '22 18:04 danbopes