当前位置:网站首页>Getting started with Paxos

Getting started with Paxos

2022-07-05 00:36:00 51CTO


Leslie - Lambert On 1990 A consistency algorithm based on message passing was proposed in . 

Basic-Paxos

Role Introduction

  • Client Request originator , External role of the system
  • Proposer receive Client request , Propose to the cluster . Play the role of conflict regulation
  • Acceptor Propose votes and recipients , Only in the trip quorum (Quorum) when , The proposal will eventually be accepted .( Arbitration system )
  • Learner Propose to the recipient , Backup , It has no impact on cluster consistency ( Don't vote )

Steps and stages

  • 1、Prepare

Proposer Put forward a proposal , The number is N, this N Greater than this Proposer Previous proposal number . request acceptor Of quorum receive

  • 2、Promise

If N More than that acceptor Any proposal number previously received is accepted , Otherwise, refuse

  • 3、Accept

If we reach the majority ,proposer Will be issued acceptor request , This request contains the proposal number N, And the content

  • 4、Accepted

If so acceptor No greater than... Was received during this period N Proposal for , Then accept the content of this proposal , Otherwise ignore

flow chart

  1. Some nodes fail , We can still reach a consensus
  2. Proposer Failure ,

Potential problems -- Live lock

Difficulty in realization , Low efficiency (2 round RPC)

Multi Paxos

Fast Paxos

原网站

版权声明
本文为[51CTO]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/186/202207050033535048.html