Skip to content
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

HTTPClient: Needs better pooling configurations #17

Open
jentfoo opened this issue Feb 16, 2018 · 2 comments
Open

HTTPClient: Needs better pooling configurations #17

jentfoo opened this issue Feb 16, 2018 · 2 comments

Comments

@jentfoo
Copy link
Member

jentfoo commented Feb 16, 2018

HTTPClient will always create a connection if it is not available. There is no way to specify a maximum connection limit (waiting till one becomes available). There is also no way to set things like maximum connection lifetimes and have them closed / expired if needed.

@lwahlmeier
Copy link
Member

HTTPClient does allow you to set the the max connections, just not the max per host, is that what you mean? If so it should be pretty easy to add, I have never had a need for this, but I could see uscases for it.

Connection lifetimes can be set through the setTimeout, granted its a global option for the client, but it will cause requests to timeout if they are not completed with in a certain amount of time. We might be able to set it in the httprequest object instead though I still have the same concerns about having state in those objects thats not really part of the httpRequest (really gets messy when thinking of the parsing/building of them on the server side).

I think you might mean there is no time out for how long we will hold connections to a server endpoint even after the request is completed? And that is true, though those connections will be closed as the pool/max connection limit is hit, or if the server times them out/closes them. It should be pretty simple to set a max keepalive if needed though.

@jentfoo
Copy link
Member Author

jentfoo commented Apr 27, 2018

HTTPClient does allow you to set the the max connections

Is this true? I only see max concurrent requests, not max connections in the pool

I think you might mean there is no time out for how long we will hold connections to a server endpoint even after the request is completed? And that is true

Yes this, is part of what I was indicating would be good to add

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants