-
Notifications
You must be signed in to change notification settings - Fork 34
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
Manipulating TCP keep-alive settings #43
Comments
+1 for this, I have a situation where I effectively want to disable tcp keep alive |
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I ran into an issue recently where a client was stuck waiting on a host that had crashed and rebooted, but never ended the connection because there wasn't any TCP traffic. This situation could have been detected and remedied earlier by configuring the TCP connection to send keep-alive probes. I took a look, and Restify currently has an option
_keep_alive
which will enable keep-alive on the socket. It would be nice if there was a way to also set the initial delay (TCP_KEEPIDLE
) in sending the probe (the second argument to.setKeepAlive()
).I don't know exactly what the interface should look like, but it could be something along the lines of:
(Or perhaps just replace
_keep_alive
. Since_keep_alive
doesn't seem to be currently documented, and it starts with an underbar, I'm guessing it's not considered a stable option?)If node ever grows a way to also set
TCP_KEEPCNT
andTCP_KEEPINTVL
, then additional fields could be added to the object for manipulating those parameters on the socket.The text was updated successfully, but these errors were encountered: