Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Raft - Consensus Algorithm to evereone

Raft - Consensus Algorithm to evereone

Raft talk given at Gophercon Brazil 2016

Avatar for Luiz Bezerra

Luiz Bezerra

November 05, 2016
Tweet

Other Decks in Programming

Transcript

  1. Raft Server Consensus Module State Machine x: 3 y: 9

    z: 0 Server Log x = 3 y = 1 y = 9 ...
  2. Raft Term Timeline Term 1 Term 2 Term 3 Term

    4 Election Normal Operation No leader Timeline
  3. Raft Messages RequestVotes Term Candidate Id Last Log Index Last

    Log Term AppendEntries Term Entries Previous Log Index Previous Log Term
  4. Follower Candidate Leader starts up times out, starts election times

    out, new election receives votes from majority of servers discovers current leader or new term discovers server with higher term Leader Election
  5. Client Consensus Module State Machine Server Log Consensus Module State

    Machine Server Log Consensus Module State Machine Server Log Leader Follower Follower
  6. Leader Completeness 1 1 1 2 2 3 3 3

    1 1 1 2 2 3 3 1 1 1 2 2 3 3 3 3 1 1 1 2 2 3 3 3 1 1 1 2 2 2 2 2 S1 S2 S3 S4 S5 1 2 3 4 5 6 7 8 9 RequestVotes Term Candidate Id Last Log Index Last Log Term