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
20260127_試行錯誤の結晶を1冊に。著者が解説 先輩データサイエンティストからの指南書 / author's_commentary_ds_instructions_guide
nash_efp
1
960
AI時代のキャリアプラン「技術の引力」からの脱出と「問い」へのいざない / tech-gravity
minodriven
21
7.2k
AI前提で考えるiOSアプリのモダナイズ設計
yuukiw00w
0
230
Basic Architectures
denyspoltorak
0
670
AIによるイベントストーミング図からのコード生成 / AI-powered code generation from Event Storming diagrams
nrslib
2
1.9k
AI巻き込み型コードレビューのススメ
nealle
1
190
プロダクトオーナーから見たSOC2 _SOC2ゆるミートアップ#2
kekekenta
0
210
AI Agent の開発と運用を支える Durable Execution #AgentsInProd
izumin5210
7
2.3k
Vibe Coding - AI 驅動的軟體開發
mickyp100
0
170
AIによる開発の民主化を支える コンテキスト管理のこれまでとこれから
mulyu
3
260
フロントエンド開発の勘所 -複数事業を経験して見えた判断軸の違い-
heimusu
7
2.8k
MDN Web Docs に日本語翻訳でコントリビュート
ohmori_yusuke
0
650
Featured
See All Featured
Abbi's Birthday
coloredviolet
1
4.7k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.3k
Jamie Indigo - Trashchat’s Guide to Black Boxes: Technical SEO Tactics for LLMs
techseoconnect
PRO
0
57
The Art of Programming - Codeland 2020
erikaheidi
57
14k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.4k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
231
22k
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
5
730
Rebuilding a faster, lazier Slack
samanthasiow
85
9.4k
Evolving SEO for Evolving Search Engines
ryanjones
0
120
Bash Introduction
62gerente
615
210k
Reality Check: Gamification 10 Years Later
codingconduct
0
2k
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