You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have a use case where we know beforehand if we need to stop sending requests to specific connections within the same client pool. Similarly to how it's possible to gracefully shut down a hyper server connection, it would be useful to be able to gracefully shutdown a specific connection. I was about to create my own pool by using handshake and a VecDeque (or something but this might be best as part of hyper directly.
More precisely, we host virtual machines which can go up, down or restart at any time. We use a custom Service implementation to choose which virtual machine to connect to based on a bunch of criteria (essentially: load balancing). When a controlled shutdown of a virtual machine happens, we're notified ~30 seconds or so before it actually happens. At that time, we'd like to make a best effort attempt at gracefully shutting down the connection in such a way that a client stops using it to send requests.
You hinted that it would be possible to do this with a Service? I think the missing bit might just be a way to mark a connection as "shutting down" so hyper knows to stop sending requests to it.
The text was updated successfully, but these errors were encountered:
I started using a Service that fulfills MakeConnection and I think that might be the way forward!
However, I've found an issue where there are no Extensions one the resulting Response. I assume that's because it's not making use of the Connection trait which the abstracted Client does use.
I don't think I'd be able to make a custom client::service::Connect to fix that because I'd need access to Connected#set to set the connection extras to the response's extensions.
Any ideas? Sounds like it might require a hyper change.
We have a use case where we know beforehand if we need to stop sending requests to specific connections within the same client pool. Similarly to how it's possible to gracefully shut down a hyper server connection, it would be useful to be able to gracefully shutdown a specific connection. I was about to create my own pool by using
handshake
and aVecDeque
(or something but this might be best as part of hyper directly.More precisely, we host virtual machines which can go up, down or restart at any time. We use a custom
Service
implementation to choose which virtual machine to connect to based on a bunch of criteria (essentially: load balancing). When a controlled shutdown of a virtual machine happens, we're notified ~30 seconds or so before it actually happens. At that time, we'd like to make a best effort attempt at gracefully shutting down the connection in such a way that a client stops using it to send requests.You hinted that it would be possible to do this with a
Service
? I think the missing bit might just be a way to mark a connection as "shutting down" so hyper knows to stop sending requests to it.The text was updated successfully, but these errors were encountered: