Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
2.2k views
in Technique[技术] by (71.8m points)

algorithm - Why is multi-paxos called multi-paxos?

Why multi-paxos is called multi-paxos? I can't see how it is "multi".

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

It's about multiple rounds of the algorithm to agree sequential requests from a stable leader with minimal messaging. Initially with no recognised leader you must run at least one round of basic Paxos where a candidate leader sends a prepare request (using the terminology of the paper Paxos Made Simple). Positive responses from a majority confirm it as leader. It then sends accept messages for that round which terminates successfully if you get a majority of accept acknowledgements. Rather than start again with prepare requests it can move immediately to a galloping mode where it sends successive accept messages when it hears a majority of acknowledgments for the previous accept request. This is highly efficient as it needs the minimal number of messages but it only occurs for multiple rounds from a stable leader. This may be interrupted by the leader crashing else a network failure which causes a follower to timeout on an otherwise healthy leader. It will then issue its own prepare request as a leadership challenge which is resolved via basic Paxos rules. As soon as you get a stable leader it can upgrade to multi-Paxos galloping mode.

See also this answer which talks about why it is safe to do this https://stackoverflow.com/a/64759874/329496


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...