Single-Decree Paxos
Five nodes (0-4) form one in-process cluster with a quorum of 3 of 5. Node 0 proposes "apple" and node 1 proposes "banana" AT THE SAME TIME, for the SAME single decree - a genuine race between proposers. Paxos guarantees at most one value is ever chosen. Every number below is computed live at build time by OnlyCSharp.ComputerNetworks.DistributedSystems.Paxos.SingleDecreePaxos.
The race
- node 0: Propose("apple")
- node 1: Propose("banana")
Message pump - round by round
| Round | Messages routed | Decided / total | Events |
|---|---|---|---|
| 1 | 10 | 0 / 5 | - |
| 2 | 10 | 0 / 5 | - |
| 3 | 10 | 0 / 5 | - |
| 4 | 10 | 0 / 5 | - |
| 5 | 5 | 5 / 5 | node 0 decided 'banana'; node 1 decided 'banana'; node 2 decided 'banana'; node 3 decided 'banana'; node 4 decided 'banana' |
The pump finished after 5 round(s) - every node decided.
Final state of every node
| Node | IsDecided | DecidedValue |
|---|---|---|
| node 0 | True | "banana" |
| node 1 | True | "banana" |
| node 2 | True | "banana" |
| node 3 | True | "banana" |
| node 4 | True | "banana" |
Verdict
PASS - all 5/5 nodes decided, and every one of them agrees on "banana" despite the simultaneous race. The algorithm - not this program - picked the winner.