Consensus

  • Getting all the nodes in distributed system to agree on something
  • Assume a database with with single leader replication
    • If the leader dies, remaining nodes can use consensus to elect a new leader
    • If two nodes believe that they are leader, the situation is called split brain
    • Split brain can lead to data loss, hence consensus should be implemented correctly
  • Algorithms:
    • Paxos
    • Raft (based on Paxos)
    • Phase King (also handles Byzantine fault)

Paxos

Fencing

  • prevents split brain
  • Fencing Token, pg. 303