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
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 and TCP_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:
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: