-
Notifications
You must be signed in to change notification settings - Fork 172
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
Connection pool in client side #1212
Comments
Hey @venugopv The HTTP connections are handled by the hyper "connection pool" and jsonrpsee is using the default settings. I think it could be a good idea to document the connection pooling and maybe provide more fine-grained settings for the connection pool. Are you running into some issues or why are you thinking about connection pooling? |
Hi @niklasad1, thanks for your quick response. I did look into Hyper's HTTP client connection pool, but unfortunately, jsonrpsee doesn't offer a way to configure those values. It would be great if it did. Secondly, I couldn't find an easy way to force the jsonrpsee HTTPclient[builder] to use only HTTP/2 |
Right, are you willing to open a PR to expose those? I would accept such change |
@niklasad1, sure, I'm happy to do. I will consider. Just to clarify, should the pull request contain both the Hyper HTTP connection pool and HTTP/2 configuration options for jsonrpsee's HttpClient/Builder? |
would be nice with two different PRs but either way is fine :) |
We're trying to set up a connection pool on the client-side but haven't found a way to do so using https://docs.rs/jsonrpsee-core/0.20.1/jsonrpsee_core/index.html.
Our setup is simple: we create a few HttpClients( using https://docs.rs/jsonrpsee-http-client/latest/jsonrpsee_http_client/struct.HttpClient.html )and then make request/batch_request calls. However, it's unclear how jsonrpsee manages HTTP connections.
I've looked into jsonrpsee's HttpClient code (at https://github.com/paritytech/jsonrpsee/blob/master/client/http-client/src/transport.rs#L170), but I couldn't find where it handles connection pooling.
It would be great if we could get some more info on connection pooling usage in jsonrpsee.
The text was updated successfully, but these errors were encountered: