Consensus and Coordination
Consensus (several servers agreeing on one value, even when some crash or messages are lost) stands behind many leader elections (choosing one server to be in charge), lock services (a server that makes sure only one client holds a lock) and replicated logs (the same list of commands kept on several servers). Interviewers ask about it because "who is the leader?" must have exactly one answer.
After this section you can explain why a majority is needed, why six servers are no better than five, how Raft elects a leader and commits a write, and why a lock with a time limit needs a fencing token.
Topics in this section
- The problem and split brain
- Majority quorums and the 2f + 1 rule
- Raft in plain words
- Paxos and Multi-Paxos
- Distributed locks, leases and fencing tokens
- Coordination services