auto commit
BIN
docs/notes/pics/101550414151983.gif
Normal file
After Width: | Height: | Size: 29 KiB |
BIN
docs/notes/pics/111550414182638.gif
Normal file
After Width: | Height: | Size: 31 KiB |
BIN
docs/notes/pics/71550414107576.gif
Normal file
After Width: | Height: | Size: 28 KiB |
BIN
docs/notes/pics/91550414131331.gif
Normal file
After Width: | Height: | Size: 23 KiB |
|
@ -314,19 +314,19 @@ Raft 也是分布式一致性协议,主要是用来竞选主节点。
|
|||
|
||||
- 来自客户端的修改都会被传入 Leader。注意该修改还未被提交,只是写入日志中。
|
||||
|
||||
<div align="center"> <img src="pics/7.gif"/> </div><br>
|
||||
<div align="center"> <img src="pics/71550414107576.gif"/> </div><br>
|
||||
|
||||
- Leader 会把修改复制到所有 Follower。
|
||||
|
||||
<div align="center"> <img src="pics/9.gif"/> </div><br>
|
||||
<div align="center"> <img src="pics/91550414131331.gif"/> </div><br>
|
||||
|
||||
- Leader 会等待大多数的 Follower 也进行了修改,然后才将修改提交。
|
||||
|
||||
<div align="center"> <img src="pics/10.gif"/> </div><br>
|
||||
<div align="center"> <img src="pics/101550414151983.gif"/> </div><br>
|
||||
|
||||
- 此时 Leader 会通知的所有 Follower 让它们也提交修改,此时所有节点的值达成一致。
|
||||
|
||||
<div align="center"> <img src="pics/11.gif"/> </div><br>
|
||||
<div align="center"> <img src="pics/111550414182638.gif"/> </div><br>
|
||||
|
||||
# 参考
|
||||
|
||||
|
|
BIN
docs/pics/101550414151983.gif
Normal file
After Width: | Height: | Size: 29 KiB |
BIN
docs/pics/111550414182638.gif
Normal file
After Width: | Height: | Size: 31 KiB |
BIN
docs/pics/71550414107576.gif
Normal file
After Width: | Height: | Size: 28 KiB |
BIN
docs/pics/91550414131331.gif
Normal file
After Width: | Height: | Size: 23 KiB |