Majority Consensus
Whenever a set of communicating replicas detects a replica failure or recovery, they test if they have a majority (more than half) of the replicas.
If so, they can elect a primary
Only one set of replicas can have a majority.
Doesn’t work well with even number of copies.
Quorum consensus
- Give a weight to each replica
- The replica set that has a majority of the weight wins
- E.g. 2 replicas, one has weight 1, the other weight 2