TCPKEEPALIVE (JANUS DEFINE parameter): Difference between revisions
mNo edit summary |
mNo edit summary |
||
Line 8: | Line 8: | ||
In some sense, the term "keepalive" is a misnomer -- keepalive packets that are not responded to cause a connection to be closed, so keepalives actually cause connections to be closed faster than they might be otherwise. | In some sense, the term "keepalive" is a misnomer -- keepalive packets that are not responded to cause a connection to be closed, so keepalives actually cause connections to be closed faster than they might be otherwise. | ||
<var>TCPKEEPALIVE</var> probably only makes sense for ports where connections are held open for long periods of time. TNSERV ports are the most likely candidate. For these ports, <var>TCPKEEPALIVE</var> might be useful for two reasons: | <var>TCPKEEPALIVE</var> probably only makes sense for ports where connections are held open for long periods of time. <var>[[JANUS DEFINE#type|TNSERV]]</var> ports are the most likely candidate. For these ports, <var>TCPKEEPALIVE</var> might be useful for two reasons: | ||
<ol> | <ol> |
Revision as of 20:00, 29 February 2012
<section begin="desc" />Use TCP Keepalives<section end="desc" />
TCPKEEPALIVE is a parameter on JANUS DEFINE, which defines and sets characteristics of a Janus port. See the List of JANUS DEFINE parameters.
This parameter specifies that connections on the port should use TCP keepalives. TCP keepalives request that the TCP stack send periodic "keepalive" packets to the communications partner to see if it is still there. The time interval between these packets, which cannot be set by Janus, is set in the TCP/IP stack configuration. For example, with the IBM stacks, the keepalive interval is set in the TCPCONFIG INTERVAL parameter for BPX (IBM Communications Server) and in the KEEPALIVEOPTIONS INTERVAL parameter for VM TCP/IP.
In some sense, the term "keepalive" is a misnomer -- keepalive packets that are not responded to cause a connection to be closed, so keepalives actually cause connections to be closed faster than they might be otherwise.
TCPKEEPALIVE probably only makes sense for ports where connections are held open for long periods of time. TNSERV ports are the most likely candidate. For these ports, TCPKEEPALIVE might be useful for two reasons:
- It can detect connections lost due to a client failure (say, a turned-off workstation), reducing threads wasted for connections to lost clients.
- It can reassure certain routers, especially those doing network address translation (NAT) that the connection is still active. Some routers will stop routing packets for connections on which no activity is seen for some period of time. Keepalives ensure that there is periodic activity on a connection, even if there is no user interaction. Of course, for this to be successful, the TCP/IP stack's keepalive interval must be less than any applicable router's inactivity timeout. For this particular application, keepalives live up to their name.
Since the TCP/IP stack does the keepalives, the overhead in Model 204 for setting this parameter is virtually zero.
This parameter is only available in Sirius Mods Version 6.9 and later.
TCPKEEPALIVE is valid for all port types.