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
Currently I can use limit_per_host to limit the number of simultaneous connections to a host. How can I limit the number of requests per timeframe (eg. minute) to each host?
Expected behaviour
A parameter probably on TCPConnector that sets a limit to the number of requests that can be made to a host in a particular timeframe. I could imagine doing what was done for timeouts and introducing a new class to put it all together eg. ConnectorLimit:
Perhaps it will never happen in aiohttp.
Your request requires significant complication of connector logic but it is not generic enough.
Rate limiting is just out of the project scope.
You can build it on top of aiohttp.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a [new issue] for related bugs.
If you feel like there's important points made in this discussion, please include those exceprts into that [new issue].
[new issue]: https://github.com/aio-libs/aiohttp/issues/new
Long story short
Currently I can use limit_per_host to limit the number of simultaneous connections to a host. How can I limit the number of requests per timeframe (eg. minute) to each host?
Expected behaviour
A parameter probably on TCPConnector that sets a limit to the number of requests that can be made to a host in a particular timeframe. I could imagine doing what was done for timeouts and introducing a new class to put it all together eg. ConnectorLimit:
In the above:
Actual behaviour
It's not possible right now.
Steps to reproduce
Your environment
aiohttp 3.3.2 client
The text was updated successfully, but these errors were encountered: