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
It would be very handy if RateLimit middleware (or a similar one) allowed to specify request weights. Some APIs assign different weights to different requests, and track the total weight used over a period of time (e.g. Binance API). So overall limit could be defined as weight per period of time (no different from current definition, other than the num units being weights instead of requests), and a weight would then need to be provided when making a request.
The text was updated successfully, but these errors were encountered:
One thing that is not obvious to me implementaion-wise, is how can poll_ready tell whether it has enough capacity to process a request if it doesn't yet know the request weight (there's no way to pass that through to poll_ready)? This wasn't an issue in RateLimit because all requests had same weight.
It would be very handy if RateLimit middleware (or a similar one) allowed to specify request weights. Some APIs assign different weights to different requests, and track the total weight used over a period of time (e.g. Binance API). So overall limit could be defined as weight per period of time (no different from current definition, other than the num units being weights instead of requests), and a weight would then need to be provided when making a request.
The text was updated successfully, but these errors were encountered: