A commit has to be replicated to majority of the cluster, and a leader is elected by approval of majority of the cluster.
More than that each of the nodes approving the commit would reject a candidate who has log inconsistent with their history. Therefore a node with inconsistent log could not be elected as a leader.
In raft paper it's shown in 5.4.3 (safety argument).
If half the nodes fail the cluster has failed. Raft and Paxos need at least a majority of nodes. It's actually not beneficial (except for load-balancing) to run an even number of nodes.
> 3. Now, master crashes and new master gets picked from the other half which never updated their states
> Wouldn’t we have inconsistent state now?
No. The half that received the event will all have a higher event count (what raft refers to as a "term"), so one of them will become the master because they're not voting for someone who knows less than they do (and neither is anyone else!)
1. The master has sent request to followers to update their state
2. Half of the followers successfully update their state and other half fail for some reason
3. Now, master crashes and new master gets picked from the other half which never updated their states
Wouldn’t we have inconsistent state now?