Replies: 1 comment 1 reply
-
The legacy client contains a connection pool, and is cheaply cloned. I would create one at startup, and clone it for each incoming connection you get. It will reuse outgoing connections as best as possible. Don't worry about the name, it's the same pooling client that has been in hyper for years. It will just be refactored so each piece is a separate layer, hence the "old" name. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
Apologies for asking, but I'm at my wits end about this, you can call it also experience with Rust..
I'm running a reverse proxy web server based in Rust, and just starting simple with it, there are obvious issues when it is exposed to higher intensity traffic, and, as you suspect, client is being created for each request resulting in a new connection for each request.
At this point, the question is, what would be the best way to take the client connections out of the main server loop and reuse them when requests need to be sent to backends ?
I was looking in several places, hyper_util being one with the legacy client, although I'm not completely sure on sharing the connections.
If there are any pointers I would appreciate them how to pursue them.
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions