-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Limit the amount of connections per host #1517
Comments
Is there some workaround to ensure that the amount of TCP connections per host is never over a certain limit? Amount of requests-in-progess could be anything, because HTTP 1.1 and HTTP 2 allow multiplexing, and the only issue here are the connections, right? @seanmonstar seeking your wisdom please. |
Only HTTP/2 can multiplex.
Not that I'm aware off. This may be easier once hyper moves its pool into various pieces to live in |
Yeah, I guess it's better not to mix the terminology. I was trying to say that even though HTTP 1.1 pipelining isn't as convenient to use as HTTP 2 multiplexing, it still allows concurrent requests over the same connection.
Good to know, thanks! |
This is kinda coming from #386, and probably/mainly also a request for hyper; I want to be able to limit the amount of requests that reqwest is making, concurrently, per host/IP.
The reasons for this is similar as in #386; too many requests are made at once, but unlike that issue, this is on a large process scale, where adding a semaphore to limit requests from all over the client would increase complexity a bit.
However, coming from python, this seemed like a "solved problem" for me; limit the amount of connections per host to a sane amount (10, or 20). Chrome does this as well (6 per host, with advantages gained by using HTTP2), however, it seems that reqwest and hyper do not limit themselves.
Even if opt-in, I'd like for there to be an option to limit the amount of pooled connections per host, to make hitting that "too many open files" error impossible.
The text was updated successfully, but these errors were encountered: