The "2N + 1" Rule (Quorum)
Why N/2 + 1?
In a distributed system, to ensure data consistency and prevent "Split Brain" (two leaders existing at once), any decision must be approved by a **Majority** of nodes.
Majority = Floor(N / 2) + 1
- For 3 nodes: Needs 2 to work (Tolerates 1 failure)
- For 5 nodes: Needs 3 to work (Tolerates 2 failures)
- For 7 nodes: Needs 4 to work (Tolerates 3 failures)
Leader Election (Raft)
When a follower stops receiving "Heartbeats" (signals "I am alive!") from the Leader, it assumes the Leader is dead. It then starts an election, votes for itself, and asks others for votes. If it gets a majority, it becomes the new Leader. This ensures the system self-heals automatically.

