Paxos
The Paxos model attempts to explore a more general form of the distributed consensus problem.
Lesile Lamport, the inventor of Latex, proposed the Paxos algorithm. He virtualized a Greek city-state called Paxos. This island made laws in accordance with the political model of parliamentary democracy, but no one wanted to devote all their time and energy to this matter. Therefore, neither the member of parliament, the speaker, or the waiter who passes the note can promise that others will show up when they need it, nor can they promise to approve the resolution of the latter's message. Because Paxos is too difficult to understand, Lamport felt that his colleagues could not understand his sense of humor, so he later republished a simple algorithm description version "Paxos Made Simple".
The consensus algorithm as a whole has two stages, as shown in the figure, the first stage is the proposal and the second stage is the decision.
To achieve fault tolorence in a distributed system, a consensus model is needed. To reach a consensus, not only the algorithm between nodes is required, but also the behavior of the client. For example, even if the replica system uses multi-paxos to synchronize log sequence numbers on all replica servers, if the Client is allowed to write data from non-leader nodes, the entire replica system is still not strongly consistent.