# Overview
Two-phase commit is... #flashcard
An algorithm for achieving atomic transaction commit across multiple node to ensure that either all nodes commit or all nodes abort. This is done using a coordinator or transaction manager to keep track of the status of the writes across multiple nodes.
<!--ID: 1751507776607-->
## Diagram
![[2024-11-21_Two-phase Commit (2PC).png]]
# Key Considerations
- How to handle coordinator going down?
- How to handle if a receiver goes down?
# Pros
- Allows for preserving atomicity of [[Database Transactions]] in a distributed system
# Cons
- Adds complexity and negatively impacts performance
# Use Cases
# Related Topics
- [[eXtended Architecture]]