Skip to content

Latest commit

 

History

History
94 lines (51 loc) · 3.3 KB

raft.md

File metadata and controls

94 lines (51 loc) · 3.3 KB

Raft

Presentation from Deigo

An Introduction to Raft (CoreOS Fest 2015)

raft_deigo_1

NextIndex: what to send to this specific follower to sync
Once nextindex == end of server.log, then appendentries become heartbeat only

raft_deigo_2

Leader could mark one entry committed once it be replicated by majority of clusters
Sever will send his committed index to the followers, followers could upgrade status

raft_deigo_3

Missing entry -> S4, get all result of S2

raft_deigo_4

Conflict entry -> S1, S2 will just remove S1's entries
Term 3 will become leader


SAFETY

raft_deigo_5

Even S5 become leader, but due to its TERM is low, will change to follower

raft_deigo_6

Middle server will never vote bottom server, index
Upper server will never vote middle server, term

raft_deigo_7

Presentation from John Ousterhout

Designing for Understandability: The Raft Consensus Algorithm

raft_john_1

Replicated state machine
raft_john_2

Paxos, proposers and acceptors, proposer will accept the one with highest proposal number

Why Raft
raft_john_3

Main topics in Raft
raft_john_4

raft_john_5

raft_john_6
Abstract of time, used to determine absolute items

raft_john_7

raft_john_8

Safety: nothing bad happens
Liveness: something good happens

raft_john_9

Log
raft_john_10

raft_john_11

Two entries in the same position has the same term, could guarantee they have the same command

raft_john_12

Case1: term matched
Case 2: follower didn't match with server's term, server knows dismatch then he will jump 1 term earlier

raft_john_13

How to guarantee leader holds all entries
When candidate ask for a vote, it send out its last latest entry.
Based on term and index decide for completeness