Classic Paxos Failure scenarios

Migo·2024년 12월 12일
post-thumbnail

If you don't know what the Paxos is yet, read this article first.

Proposer failure scenarios at a glance

  • Proposer fails during the second phase, before broadcasting the value to acceptors
  • Proposer fails during the second phase, after sending the value to only one acceptor
  • Proposer fails during the second phase, after sending the value to only one acceptor and the acceptor fails shortly after.

1) Proposer fails during the second phase, before broadcasting the value to acceptors

In this case, new proposer can pick up and commit the value. Let's look at the following picture:

So the key point is the second proposer starts a new round with a higher proposal number and proceeds by commiting old value(v1) proposed by the failed proposer.

In this failure scenario, proposer failure doesn't result in failure of consensus.

2) Proposer fails during the second phase, after sending the value to only one acceptor

This time, the second proposer starts a new round with higher proposal number2 as in the first failure scenario. But before it reaches the A1, the proposer collects votes from A2 and A3.

In this case, despite the fact that there is a different committed value in history on A1, p2 will anyway commit v2

3) Proposer fails during the second phase, after sending the value to only one acceptor and the acceptor fails shortly after.

In this case, any proposer that comes after the first proposer will simply overlap the previous record and choose more recently accepted proposal as follows.

Acceptor failures?

Paxos algorithm can tolerate acceptor failures so long as there are enough acceptors to reach consensus.

profile
Dude with existential crisis

0개의 댓글