INTRODUCTION:
The KeepAlive or HTTP persistent connection setting is a connection setting that causes the TCP socket to periodically a signal the connection from being closed due to appearing as idle. This setting is particularly useful for TCP connections that must pass through a firewall, which might proactively close connections that it determines to be idle. Below are the instructions on enabling the Keep-Alive setting for various operating systems. For more information on the Keep-Alive or persistent Connection setting, refer to the Microsoft article here:
Things that you may want to know about TCP Keepalives
ENABLING KEEPALIVE IN WINDOWS OS
Registry Modification Warning: Modifying registry values incorrectly may cause serious, system-wide problems that may require the re-installation of Microsoft Windows NT. Any edit of the registry is done at the user`s own risk. Since these are user-initiated changes, they are not covered by any Strategy warranty. If using Microsoft Windows NT, the user should backup the registry and/or update an Emergency Repair Disk (ERD) prior to alterations.
ENABLING KEEPALIVE IN SOLARIS OS
From the root account, use the ndd command to set the Keep-Alive interval value (milliseconds):
ndd -set /dev/tcp tcp_keepalive_interval 15000
Restart the system. To permanently change the value, the command will need to be set while the system is starting by modifying a startup script (e.g. /etc/rc ….)
ENABLING KEEPALIVE IN LINUX OS
echo 15 > /proc/sys/net/ipv4/tcp_keepalive_intvl
echo 5 > /proc/sys/net/ipv4/tcp_keepalive_probes
ENABLING KEEPALIVE IN HP-UX
ndd -set /dev/tcp tcp_keepalive_interval 15000
ndd -set /dev/tcp tcp_keepalive_kill 5000
ENABLING KEEPALIVE IN AIX
no -o tcp_keepidle=30
no -o tcp_keepintvl=10