-
Notifications
You must be signed in to change notification settings - Fork 120
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
Handle PeerClient
timeouts correctly.
#51
Comments
This is potentially related to #49 in that we need to have some kind of timeout for |
Previously I was inclined towards 1) but I think 2) may be better....? |
If we try 2) then this depends on #53 to have a config field. |
Paused this to work on #62, resuming. |
This was done by #65 |
The current peer handling code from #17 does not handle client request timeouts correctly (or at all). This must be fixed. Because we need to statefully translate the legacy protocol into our internal protocol, I think we cannot use the
tower_timeout
middleware, because we need to reset thePeerServer
state when the request is dropped.There are three ways we could proceed:
"Drop": after a fixed timeout period, if a response has not arrived, fail the peer server and client together, and possibly spin up a new connection to the same remote in a later round of service discovery. This avoids having to change the server's state machine.
"Server Timeout": add a timeout event to the server's state machine that fails a client request after a particular time interval (presumably a configured value set by the
PeerConnector
)."Something with Tower": come up with a way to make the server event loop work gracefully with
tower_timeout
middleware (e.g., detect that the request has been dropped? unsure how this would trigger an event... or if this option is possible).The text was updated successfully, but these errors were encountered: