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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
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
AIフル活用時代だからこそ学んでおきたい働き方の心得
shinoyu
0
130
Amazon Bedrockを活用したRAGの品質管理パイプライン構築
tosuri13
4
480
CSC307 Lecture 03
javiergs
PRO
1
490
AI Agent Tool のためのバックエンドアーキテクチャを考える #encraft
izumin5210
6
1.8k
Grafana:建立系統全知視角的捷徑
blueswen
0
330
FOSDEM 2026: STUNMESH-go: Building P2P WireGuard Mesh Without Self-Hosted Infrastructure
tjjh89017
0
160
【卒業研究】会話ログ分析によるユーザーごとの関心に応じた話題提案手法
momok47
0
200
それ、本当に安全? ファイルアップロードで見落としがちなセキュリティリスクと対策
penpeen
7
3.9k
疑似コードによるプロンプト記述、どのくらい正確に実行される?
kokuyouwind
0
380
OCaml 5でモダンな並列プログラミングを Enjoyしよう!
haochenx
0
140
Data-Centric Kaggle
isax1015
2
770
CSC307 Lecture 06
javiergs
PRO
0
680
Featured
See All Featured
So, you think you're a good person
axbom
PRO
2
1.9k
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
51
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
56
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
120
sira's awesome portfolio website redesign presentation
elsirapls
0
150
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
49
9.9k
The Spectacular Lies of Maps
axbom
PRO
1
520
Balancing Empowerment & Direction
lara
5
890
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.4k
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
1
640
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
110
The Art of Programming - Codeland 2020
erikaheidi
57
14k
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