Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Raft - Consensus Algorithm to evereone
Search
Luiz Bezerra
November 05, 2016
Programming
0
55
Raft - Consensus Algorithm to evereone
Raft talk given at Gophercon Brazil 2016
Luiz Bezerra
November 05, 2016
Tweet
Share
Other Decks in Programming
See All in Programming
AtCoder Conference 2025
shindannin
0
1.1k
AI Schema Enrichment for your Oracle AI Database
thatjeffsmith
0
270
余白を設計しフロントエンド開発を 加速させる
tsukuha
7
2.1k
Fluid Templating in TYPO3 14
s2b
0
130
ThorVG Viewer In VS Code
nors
0
770
Basic Architectures
denyspoltorak
0
670
Amazon Bedrockを活用したRAGの品質管理パイプライン構築
tosuri13
4
500
Architectural Extensions
denyspoltorak
0
280
プロダクトオーナーから見たSOC2 _SOC2ゆるミートアップ#2
kekekenta
0
210
今こそ知るべき耐量子計算機暗号(PQC)入門 / PQC: What You Need to Know Now
mackey0225
3
370
AIによる高速開発をどう制御するか? ガードレール設置で開発速度と品質を両立させたチームの事例
tonkotsuboy_com
7
2.3k
Rust 製のコードエディタ “Zed” を使ってみた
nearme_tech
PRO
0
170
Featured
See All Featured
Designing for Timeless Needs
cassininazir
0
130
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
3.9k
KATA
mclloyd
PRO
34
15k
Test your architecture with Archunit
thirion
1
2.1k
jQuery: Nuts, Bolts and Bling
dougneiner
65
8.4k
Statistics for Hackers
jakevdp
799
230k
The Limits of Empathy - UXLibs8
cassininazir
1
210
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
2.3k
Designing Powerful Visuals for Engaging Learning
tmiket
0
230
Done Done
chrislema
186
16k
Odyssey Design
rkendrick25
PRO
1
490
Transcript
Raft @luizbafilho consensus algorithm to everyone
Consensus
Replicated Log
Raft consensus algorithm for managing a replicated log
Raft Understandable Complete foundation for implementation Easy to implement
Where?
Example Server DB DB DB
Open-source projects using it Raft
Raft Server Consensus Module State Machine x: 3 y: 9
z: 0 Server Log x = 3 y = 1 y = 9 ...
Raft Term Timeline Term 1 Term 2 Term 3 Term
4 Election Normal Operation No leader Timeline
Raft Messages RequestVotes Term Candidate Id Last Log Index Last
Log Term AppendEntries Term Entries Previous Log Index Previous Log Term
Leader Election Safety Log Replication
Leader Election
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
Raft Scope Source: https://raft.github.io/raftscope-replay/index.html
Raft Scope Source: https://raft.github.io/raftscope-replay/index.html
Raft Scope - Leader Stop Source: https://raft.github.io/raftscope-replay/index.html
Raft Scope - Leader Stop Source: https://raft.github.io/raftscope-replay/index.html
Raft Scope - Split Votes Source: https://raft.github.io/raftscope-replay/index.html
Raft Scope - Split Votes Source: https://raft.github.io/raftscope-replay/index.html
Log Replication
Client Consensus Module State Machine Server Log Consensus Module State
Machine Server Log Consensus Module State Machine Server Log Leader Follower Follower
Source: http://bit.ly/2fyk4K5 Log Replication - Happy Path Leader Follower Follower
Source: http://bit.ly/2fyk4K5 Log Replication Leader Follower Follower
Source: http://bit.ly/2fyk4K5 Log Replication Leader Follower Follower
Source: http://bit.ly/2fyk4K5 Log Replication - Network Partition Leader Follower Follower
Source: http://bit.ly/2fyk4K5 Log Replication - Network Partition Leader Follower Leader
Source: http://bit.ly/2fyk4K5 Log Replication - Network Partition Leader Follower Leader
Source: http://bit.ly/2fyk4K5 Log Replication - Network Partition Follower Follower Leader
Safety
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
Log Compaction
Obrigado! Estamos Contratando! https://talentos.globo.com
References • https://raft.github.io/raft.pdf • https://raft.github.io/slides/uiuc2016.pdf • https://raft.github.io/slides/buildstuff2015.pdf • https://speakerdeck.com/vanstee/raft-consensus-for-rubyists •
https://raft.github.io/raftscope/index.html