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
DevFest Android in Korea 2025 - 개발자 커뮤니티를 통해 얻는 가치
wisemuji
0
180
フロントエンド開発の勘所 -複数事業を経験して見えた判断軸の違い-
heimusu
7
2.5k
Canon EOS R50 V と R5 Mark II 購入でみえてきた最近のデジイチ VR180 事情、そして VR180 静止画に活路を見出すまで
karad
0
140
疑似コードによるプロンプト記述、どのくらい正確に実行される?
kokuyouwind
0
230
16年目のピクシブ百科事典を支える最新の技術基盤 / The Modern Tech Stack Powering Pixiv Encyclopedia in its 16th Year
ahuglajbclajep
5
830
Basic Architectures
denyspoltorak
0
210
AIエージェントの設計で注意するべきポイント6選
har1101
6
3.1k
20251212 AI 時代的 Legacy Code 營救術 2025 WebConf
mouson
0
250
CSC307 Lecture 01
javiergs
PRO
0
670
Honoを使ったリモートMCPサーバでAIツールとの連携を加速させる!
tosuri13
1
120
Implementation Patterns
denyspoltorak
0
160
インターン生でもAuth0で認証基盤刷新が出来るのか
taku271
0
170
Featured
See All Featured
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
220
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
86
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
0
130
Producing Creativity
orderedlist
PRO
348
40k
Bash Introduction
62gerente
615
210k
Git: the NoSQL Database
bkeepers
PRO
432
66k
What's in a price? How to price your products and services
michaelherold
246
13k
The Power of CSS Pseudo Elements
geoffreycrofte
80
6.1k
sira's awesome portfolio website redesign presentation
elsirapls
0
110
Paper Plane
katiecoart
PRO
0
45k
Java REST API Framework Comparison - PWX 2021
mraible
34
9.1k
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