IT lexicon › Database › Two-phase commit

Two-phase commit 2PC

Database På svenska → Updated: 2026-05-23

Protocol for transactions across multiple databases — phase 1: everyone "prepare", phase 2: everyone "commit" or everyone "rollback".

Classic solution for distributed transactions. Problem: the coordinator dies mid-flow = nodes left hanging. Modern microservice world: prefers the saga pattern or eventual consistency over 2PC. XA transactions = the enterprise implementation.

← Back to the lexicon