Paxos vs two phase commit

前端 未结 2 698
别那么骄傲
别那么骄傲 2021-01-30 16:42

I am trying to understand the difference between paxos and two phase commit as means to reach consensus among multiple machines. Two phase commit and three phase commit is very

2条回答
  •  南方客
    南方客 (楼主)
    2021-01-30 17:29

    2-PC is the most traditional transaction commit protocol and powers the core of atomicity of transactions. But it is blocking in nature, i.e. if the transaction manager/coordinator fails in between, it will cause the protocol to block and no process will be aware of it. It requires manual intervention to repair the coordinator.

    While Paxos being a distributed consensus protocol has multiple such coordinators and if a majority of the coordinators agree to the transaction completion, it becomes a successful atomic transaction.

    You should read https://www.microsoft.com/en-us/research/wp-content/uploads/2016/02/tr-2003-96.pdf to understand how these two protocols are differentiated in a more granular manner. In the same paper, Gray and Lamport also introduce a protocol i.e. a combination of Paxos and 2-PC for faster performance.

提交回复
热议问题