Modelling API rate limits as diophantine inequalities
vivekn.dev
vivekn.dev
There's no reason the retry times have to be integers. But the number of retries has to be an integer.
Doing so allows other decisions to be made beyond rate limiting, such as prioritization, deferring invocations, memoization, etc.