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
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
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
コーディングルールの鮮度を保ちたい / keep-fresh-go-internal-conventions
handlename
0
230
条件判定に名前、つけてますか? #phperkaigi #c
77web
2
800
ポーリング処理廃止によるイベント駆動アーキテクチャへの移行
seitarof
3
1.3k
AI Assistants for Your Angular Solutions
manfredsteyer
PRO
0
160
SourceGeneratorのマーカー属性問題について
htkym
0
220
[PHPerKaigi 2026]PHPerKaigi2025の企画CodeGolfが最高すぎて社内で内製して半年運営して得た内製と運営の知見
ikezoemakoto
0
290
20260228_JAWS_Beginner_Kansai
takuyay0ne
5
620
Feature Toggle は捨てやすく使おう
gennei
0
340
Claude Codeログ基盤の構築
giginet
PRO
7
3.6k
Everything Claude Code OSS詳細 — 5層構造の中身と導入方法
targe
0
150
Angular-Apps smarter machen mit Gen AI: Lokal und offlinefähig - Hands-on Workshop!
christianliebel
PRO
0
140
今からFlash開発できるわけないじゃん、ムリムリ! (※ムリじゃなかった!?)
arkw
0
150
Featured
See All Featured
HDC tutorial
michielstock
1
580
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
180
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
200
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
5
770
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
110
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
Faster Mobile Websites
deanohume
310
31k
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
1
490
Rails Girls Zürich Keynote
gr2m
96
14k
The Cost Of JavaScript in 2023
addyosmani
55
9.8k
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
1
2.5k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
22k
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