Glossary

2PC (Two-Phase Commit)

Two-Phase Commit (2PC) is a distributed transaction protocol that guarantees atomicity across multiple nodes. Either all nodes commit the transaction, or none of them do.

Two phases

Problems

Alternative

Saga Pattern — abandons 2PC in favour of compensating transactions and Eventual Consistency. More practical for microservices.