Search⌘ K
AI Features

Basic Paxos in Action

Explore how the basic Paxos algorithm ensures consensus across distributed systems by simulating different scenarios. Understand proposer, acceptor, and learner roles as well as challenges like dueling proposers and how a distinguished proposer resolves them to maintain safety and make progress.

We learned the rules for the basic Paxos algorithm in the previous lesson. In this lesson, we will see those rules in action by running Paxos through three different scenarios. We will also see a situation where Paxos makes no progress. Lastly, we will present a solution to making progress and a complete Paxos protocol simulation involving all three roles: proposers, acceptors, and learners. This will also show the role of learners in knowing the current status of a slot's chosen value.

Previous value already chosen

Let's see what happens when a value has already been chosen, and a new proposer comes in even with a higher proposal number. According to the rules, the new proposer is obligated to acknowledge the already chosen value and cannot enforce its own value.

Server 5 honors the already chosen value
Server 5 honors the already chosen value

Previous value not chosen, but new proposer sees it

Due to network delays, messages can reach different servers at different times. The messages of different servers ...