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

Auto detection of half open connections. #4

Open
prataprc opened this issue Jun 23, 2017 · 0 comments
Open

Auto detection of half open connections. #4

prataprc opened this issue Jun 23, 2017 · 0 comments

Comments

@prataprc
Copy link
Member

Socket Read() and Write() are blocking, in TCP/IP there can be scenarios of half open connections and other un-detectable network errors on the connections.

On approach is to use net/ package's feature of setting Deadline timeouts for reads and writes, but profiling shows that this can lead to performance issues when we scale connections.

Another approach is to use the heart-beat. That is both peers should set the heartbeat, and expose an API to learn when the last heartbeat was received, set a threshold and close the socket after that.
May be we need a separate monitor routine for this.

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

No branches or pull requests

1 participant