hearbeat of RAC

Heartbeat is a pooling mechanism in clustered platforms to verify if the other server participating in the cluster is alive. Oracle also uses the heartbeat mechanism to verify the health of the other nodes participating in the cluster.In a RAccluster,every node will poll the other node in the cluster,This helps each server in the cluster to understand the health of the other server in the cluster and take appropriate actions should polling fail. In RAC,the CSS performs polling in three different methods:

1)Network Heartbeat (NHB)

2)disk Heartbeat (DHB)

3) Local Heartbeat (LHB)

1)Network Heartbeat (NHB)
The NHB is sent over the private interconnect. CSS sends an NHB every second from one node to all the other nodes in a cluster and receives an NHB from the remote nodes similarly every second. The NHB contains timestamp information from the local node and is used by the remote. If an ackNowledgment is not received from the other node
in the cluster in 30 seconds (represented by the miscount value),CSS would request a cluster reconfiguration. The reconfiguration will not always be required. CSS will verify the health and state of the node through other methods before making a decision for reconfiguration.

2)disk Heartbeat (DHB)
Apart from the NHB,we use the DHB,which is required for split-brain resolution. It contains a timestamp of the local time in Unix epoch seconds as well as a millisecond timer. The DHB is the definitive mechanism to make a decision about whether a node is still alive. DHB is a mechanism where each server in the cluster will write a timestamp to the voting disk every second. In the case of NHB failure,CSS will verify the voting disk to check if the node in question has written any timestamp to the voting disk during the NHB missed timeframe to decide if cluster reconfiguration is required.

3)Local Heartbeat (LHB)
LHB is an internal heartbeat mechanism where the message is sent to the cssdmonitor and the cssdagent to keep them informed about the health of the CSS. LHB notifications also happen every second and use and share the same thread with the NHB and DHB.

此外,我们还需要思考

1)当split-brain发生时,如何判断哪些节点存活下去?谁来计算和判断?根据什么来计算和判断?这些搞清楚,就差不多了。

2)上面介绍的是cluster层面的心跳,除此之外,Oracle层面也有自己的心跳机制,那就是通过ckpt进程和control files实现的,这里就不具体讲述了。

相关文章

Java Oracle 结果集是Java语言中处理数据库查询结果的一种方...
Java AES和Oracle AES是现代加密技术中最常使用的两种AES加密...
Java是一种广泛应用的编程语言,具备可靠性、安全性、跨平台...
随着移动互联网的发展,抽奖活动成为了营销活动中不可或缺的...
Java和Oracle都是在计算机领域应用非常广泛的技术,他们经常...
Java 是一门非常流行的编程语言,它可以运行于各种操作系统上...