Two-phase commit: The start of our journey to a fault-tolerant replicated state machine

What is 2PC

  1. A coordinator process proposes an action to take, and broadcasts this proposal to all follow processes.
  2. The follower processes all respond back to the coordinator with a yes/no vote to the proposal.
  3. The coordinator responds back to all of the followers with the decision, which is to commit if all followers voted yes, and to abort otherwise.
  4. After executing the decision to either commit or abort, the followers respond back to the coordinator, acknowledging they have completed this step.

Problems

Coordinator failures

Only as strong as the weakest link

A crash on acknowledgement

Looking Forward

--

--

--

Working on storage management and infrastructure at Azure SQL

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

How to Get Continuous Integration Right

Create your Spring framework — History and Internals of Dependency Injection + IoC

How we went from three failed projects to 1200 users in just one week

Ansible Tower with Windows Managed Node

Event Viewer Troubleshooting

What Is an API and Why Should I Use One?

You don’t need standup

Improving HTML Time to First Byte

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Aashray Anand

Aashray Anand

Working on storage management and infrastructure at Azure SQL

More from Medium

Build a Weather Mobile App with Ionic

Hardware I Use For Selfhosting

7 Options to Modernize Legacy Applications for Future

How I added Password Resets to my App without requiring Personal Data