A keepalive (KA) is a message sent by one device to another to check that the link between the two is operating, or to prevent this link from being broken.
A keepalive signal is often sent at predefined intervals, and plays an important role on the Internet. After a signal is sent, if no reply is received the link is assumed to be down and future data will be routed via another path until the link is up again. A keepalive signal can also be used to indicate to Internet infrastructure that the connection should be preserved. Without a keepalive signal, intermediate NAT-enabled routers can drop the connection after timeout.
Since the only purpose is to find links that don't work or to indicate links that should be preserved, keepalive messages tend to be short and not take much bandwidth. However, their precise format and usage terms depend on the communication protocol.
The Hypertext Transfer Protocol supports explicit means for maintaining an active connection between client and server. This ability was added after the fact to HTTP 1.0 using the "Connection: Keep-alive" header, but became the default behaviour for HTTP 1.1.
Transmission Control Protocol (TCP) keepalives are an optional feature, and if included must default to off. The keepalive packet contains null data. In an Ethernet network, a keepalive frame length is 60 bytes, while the server response to this, also a null data frame, is 54 bytes. There are three parameters related to keepalive:
- Keepalive time is the duration between two keepalive transmissions in idle condition. TCP keepalive period is required to be configurable and by default is set to no less than 2 hours.
- Keepalive interval is the duration between two successive keepalive retransmissions, if acknowledgement to the previous keepalive transmission is not received.
- Keepalive retry is the number of retransmissions to be carried out before declaring that remote end is not available.
- "HTTP Keep Alive discourse by Jim Driscoll". Archived from the original on 2010-08-13.
- "Requirements for Internet Hosts - Communication Layers". IETF. October 1989. Retrieved November 8, 2013.
- "File Session Traffic". Microsoft TechNet. Retrieved November 6, 2013.
|This computer networking article is a stub. You can help Wikipedia by expanding it.|