Paxos Algorithm in the Context of a Distributed Database Transaction

I had some confusion regarding paxos, especially in the context of database transactions:

The article "paxos simple" in the second phase says that the developer needs to choose one of the values ​​with the highest serial number that one of the acceptors has previously accepted (if there is no such value, the proposal can select the initial value).

Questions:

  • On the one hand, I understand that it maintains consensus. But, on the other hand, I got confused about what actually represents value: what "you need to send acceptors to the value that was accepted earlier"?

  • In the context of database transactions, what if it needs to commit a new value? Do I need to start a new instance of Paxos?

  • If the answer to the above question is "Yes", then how do they accept a reset state? (In my understanding, if this is not a reset state, then the sentence will be forced to send one of the old values ​​that was accepted earlier, and not freely pass any new value.)

+4
source share
4 answers

Instead of directly answering your questions, I’ll try to explain how you can implement a database transaction with Paxos, perhaps this will help you figure it out.

, , , "". -, , , . -, "Commit" / "Abort" . "" "Commit" / "Abort" .

, Paxos, , Paxos , , , . , , , . , , , , , Paxos, . , , , 2 FOO, , BAR.

- FOO, , BAZ, 1 Paxos Prepare. , FOO , Prepare. , "Vote Commit" Promise, . , "Vote Abort" ( , . ).

Promise "Vote Commit" / "Vote Abort" , "Commit" "Abort" . Paxos Prepare, , - (Acceptor Paxos) "Commit" / "Abort" . - , "Commit" / "Abort" , . , . "Vote Commit" / "Vote Abort" Promises. "Vote Commmit", "Commit" , "Abort" .

Paxos, , "Commit" / "Abort" . , "Commit" , , FOO, BAZ 2 .

+1

" " paxos. - ( , , ), - . , - , - .

:

  • Paxos - , , , . , , ( ). , .

    Multi-Paxos - , .

  • Multi-Paxos . , . Multi-Paxos Paxos. , , -op. , .

  • Multi-Paxos: Paxos . Paxos , "" dist. . " , Paxos" .

+1

Paxos Made Simple. . .

, , . , , - " , "?

- , . , , , node . node. node, . , , , , , .

, , ? Paxos?

, , . " ", .

, , ; . , . , , , , (.. ).

"", reset ?

. node , . "" ( ), "" . Paxos , . , , . .

0

ZAB. PAXOS. paxos multipaxos.

When a client sends a commit to any node in the cluster, it redirects that commit to the leader, the leader then sends a commit message to each node in the quorum, when all nodes confirm the commit, it will give it its own log.

0
source

Source: https://habr.com/ru/post/1614109/


All Articles