Oracle Real Application Clusters (RAC) is a high-availability solution that allows multiple servers to access a single database. However, without proper safeguards, network or storage failures can lead to a split-brain scenario, where two or more nodes independently think they are the active cluster and write to shared disks, causing data corruption.
To prevent this, Oracle RAC uses a combination of voting disks, interconnect heartbeat, and node eviction. This article explains these mechanisms in simple terms.
What is Split Brain?
In a cluster, a "split brain" occurs when communication between nodes fails, but each node continues to operate as if it alone owns the database. Without arbitration, each node could overwrite the other's data, leading to corruption.
Voting Disk: The Arbiter
A voting disk is a shared storage area that acts as a tiebreaker. Each RAC node writes its heartbeat signal to the voting disk. If one node loses contact with another, it checks the voting disk to see if the other node is still alive. The voting disk contains a quorum mechanism: if a node cannot reach a majority of voting disks, it is evicted from the cluster.
Interconnect Heartbeat
Nodes continuously send heartbeat signals across a private network (the interconnect). If a heartbeat is not received within a configured timeout, the node is suspected of being down. The heartbeat ensures fast detection of failures.
Node Eviction
When a node fails to communicate via both the interconnect and voting disk, the surviving nodes initiate node eviction. The unresponsive node is forcefully removed (fenced) from the cluster, and its resources are taken over. This prevents it from accessing shared disks and causing corruption.
Real-Time Scenario
Consider a two-node RAC cluster. Suddenly, the network switch between nodes fails. Node A cannot ping Node B, but both can still access the voting disk. Node A writes to the voting disk, sees Node B is still present, and triggers a reboot of Node B. Node B is evicted, and Node A continues safely.
This simple explanation helps Oracle DBAs understand the fundamentals of RAC high availability and is useful for interview preparation and real-world troubleshooting.