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
After I hit the rate-limit, the Retry-After header is added to the request, but the value is always set to the window length, (in this case 60 seconds)
If the client sends 10 requests spaced out by 2 seconds and then sends a 11th one (which the rate-limiter should catch), shouldn't the Retry-After header contain 40 (the 10 first requests took 20 seconds to complete) instead of 60, as the next request will be accepted 60 seconds after the initial request was made, not 60 seconds after the first failing request?
This would enable the client to wait for the exact time it needs to if it hits the rate limit.
The text was updated successfully, but these errors were encountered:
Currently, if I configure a rate limiter with the following code
After I hit the rate-limit, the
Retry-After
header is added to the request, but the value is always set to the window length, (in this case 60 seconds)If the client sends 10 requests spaced out by 2 seconds and then sends a 11th one (which the rate-limiter should catch), shouldn't the
Retry-After
header contain40
(the 10 first requests took 20 seconds to complete) instead of60
, as the next request will be accepted 60 seconds after the initial request was made, not 60 seconds after the first failing request?This would enable the client to wait for the exact time it needs to if it hits the rate limit.
The text was updated successfully, but these errors were encountered: