当前位置:网站首页>Briefly describe the similarities and differences between raft and Paxos in design

Briefly describe the similarities and differences between raft and Paxos in design

2022-07-23 12:47:00 liangdu_ Zuker

1.raft And mutil-Paxos The same thing CAP In the model CP Model
2.raft It also uses broadcasting to synchronize information , Use multiple backups to achieve high availability , Use master to realize efficient read-write model , utilize “ Majority rule ” To achieve consistency ( This point is understood as that it is better to reduce dryness and fault tolerance , Because multi person synchronization is easy to make noise ).

  • The only difference is : raft The time sequence formed by the time difference is used to determine who is Master, and paxos The numerical value and version number are used to determine who is Master.

  • In terms of advantages and disadvantages ,raft It can reduce the number of message communication , Thus reducing election delays , Performance ratio paxos high , And the final effect is similar to paxos equally . You can also modify master The election rules are as simple . For example, we can change the rule of presidential election from the number of votes to who is handsome , Of course, there is only one ballot box for us to elect president , So you don't need to use “ Majority rule ” To reduce dryness .

  • If there's a brain crack , That is, no more than half of the votes , Then there will be a re-election ( Fall back into the timeout waiting process ), This is the same as paxos equally .( Brain crack will cause rollback , Because this is what we do with bitcoin ,paxos It's the same thing )

原网站

版权声明
本文为[liangdu_ Zuker]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/204/202207230540150645.html