The Backend Engineering Show with Hussein Nasser cover image

Distributed Transactions are Hard (How Two-Phase Commit works)

The Backend Engineering Show with Hussein Nasser

00:00

Are You Ready? All Right?

If all of those guys voted yes, that means all their prepare transactions are flushed to disk and in case of failure, we're good. In that best case scenario, because nothing is perfect again, the coordinator will come back and say, all right, since everybody voted yes, I think it's safe to do this. It's safe to commit. So it decides based on some logic to commit or to roll back. This is called also the voting stage. It's like, hey, vote, vote,vote. Are you guys ready? Everybody's ready? Hey, everybody's good? All right.

Transcript
Play full episode

Remember Everything You Learn from Podcasts

Save insights instantly, chat with episodes, and build lasting knowledge - all powered by AI.
App store bannerPlay store banner
Get the app