Live data from Hacker News

Modelling API rate limits as diophantine inequalities

vivekn.dev

1–7 of 7 posts

Re: Modelling API rate limits as diophantine inequalities

#5
If they do not know about it already, the OP would benefit from knowing more about Linear Programming and Mixed Integer Linear Programming. Many optimization problems can be naturally modeled into LPs or MILPs and there are POWERFUL solvers with decades of theory and optimization behind them already developed to solve them.

Re: Modelling API rate limits as diophantine inequalities

#6
This is an interesting approach, but a simpler one is to add a level of indirection by having a supervisor meter requests, including retries, and provide back-pressure as applicable.

Doing so allows other decisions to be made beyond rate limiting, such as prioritization, deferring invocations, memoization, etc.