Keepalive and Heartbeat

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 the link from being broken.

Keepalive also refers more generally to a system which keeps a service highly available.

Heartbeat refers more specifically to a communication protocol, where to or more members of a high-availability setup periodically send “Yes, I’m still alive!” messages.

RabbitMQ  – Detecting Dead TCP Connections with Heartbeats and TCP Keepalives