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

Add handshake timeout #108

Open
gdamore opened this issue Aug 5, 2019 · 1 comment
Open

Add handshake timeout #108

gdamore opened this issue Aug 5, 2019 · 1 comment

Comments

@gdamore
Copy link
Contributor

gdamore commented Aug 5, 2019

With the recent integration of #96 / #102 -- we no longer hang the whole application while waiting for a handshake. But, handshaking of TCP, TLS+TCP, and IPC should complete in a timely fashion, and we should add a timeout that closes connections from peers that do not complete the handshake within a modest period of time.

We propose to set this to 5 seconds by default. Satellite connections can have very long (500ms or so) latencies, but 5 seconds should be sufficient for everywhere in local Earth orbit. Latency to the moon is about 1.3 sec.

One thing we could do to make this a little more forgiving is require forward progress, so that the handshake doesn't timeout in 5 absolute seconds, but times out if no progress is seen for 5 seconds.

This issue does not intend to address timeouts on established connections. That's an orthogonal issue and should be treated separately.

@gdamore
Copy link
Contributor Author

gdamore commented Sep 1, 2019

5 seconds is probably not sufficient for all use cases. Satellite latencies can approach 2 seconds. This is fairly abysmal, but we'll want to set the default a bit higher. NNG chose 10 seconds.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant