Skip to content

Heartbeat

Heartbeat是distributed computing中广泛采用的一种technique。

素材

Heartbeat (computing)

https://en.wanweibaike.com/wiki-Heartbeat%20protocol

In computer science, a heartbeat is a periodic signal generated by hardware or software to indicate normal operation or to synchronize other parts of a computer system.[1] Usually a heartbeat is sent between machines at a regular interval in the order of seconds. If the endpoint does not receive a heartbeat for a time—usually a few heartbeat intervals—the machine that should have sent the heartbeat is assumed to have failed.[2]

Heartbeat message

https://en.wanweibaike.com/wiki-Heartbeat%20message

A heartbeat message in signal processing is a message sent from an originator to a destination that enables the destination to identify if and when the originator fails or is no longer available.[1] Heartbeat messages are typically sent non-stop on a periodic or recurring basis from the originator's start-up until the originator's shutdown. When the destination identifies a lack of heartbeat messages during an anticipated arrival period, the destination may determine that the originator has failed, shutdown, or is generally no longer available. Heartbeat messages may be used for high-availability and fault tolerance purposes.

Heartbeat network

https://en.wanweibaike.com/wiki-Heartbeat%20network

In computer clusters, a heartbeat network is a private network which is shared only by the nodes in the cluster, and is not accessible from outside the cluster. It is used by cluster nodes in order to monitor each node's status and communicate with each other messages necessary for maintaining operation of the cluster.

Case study

Case: Linux-HA

https://en.wanweibaike.com/wiki-Heartbeat%20(program)

Case: zookeeper

ZooKeeper Getting Started Guide 中有这样的介绍:

tickTime : the basic time unit in milliseconds used by ZooKeeper. It is used to do heartbeats and the minimum session timeout will be twice the tickTime.