brandur/redis-cell

redis-cell is rounding down

Closed this issue · 1 comments

It would be better, if the seconds would get rounded up instead of down.
I also don't understand why the limit is max_burst+1 (instead of max_burst).

fxn commented

Agreed. Nowadays, if you wait Retry-After after a 429, chances are you get another 429.

The promise of Retry-After is that if you wait that amount using the same clock, the request is not limited. This promise is broken today.

Reason is the 4th element of the Redis response is num_seconds() of a duration, which discards the fractional part.