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

Every request starts a new client & connection #324

Closed
jmreardon-yoppworks opened this issue Sep 4, 2024 · 2 comments
Closed

Every request starts a new client & connection #324

jmreardon-yoppworks opened this issue Sep 4, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@jmreardon-yoppworks
Copy link

I've observed that every request to the IronCore server starts a new TCP (and therefore TLS connection) resulting in a time-consuming TLS handshake for every request. This appears to be due to ironoxide instantiations a new Client for every request:

let client = Client::new();

Per the reqwest docs, the Client has it's own connection pool and it is expected to be instantiated once and be resued. It's possible the startup time for creating a new Client is slow as well.

@BobWall23 BobWall23 added the enhancement New feature or request label Sep 5, 2024
@BobWall23
Copy link
Member

BobWall23 commented Sep 5, 2024

We'll investigate adding the client to IronCoreRequest. We noticed this problem and fixed it in other products, but didn't check it here. Thanks for the report.

@skeet70
Copy link
Member

skeet70 commented Sep 10, 2024

We fixed this in #325, though in our benchmarks it didn't make a performance difference either way.

@skeet70 skeet70 closed this as completed Sep 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants