Last Updated: June 8, 2026
In a monolith, one database transaction can make multiple writes atomic.
In microservices, each service owns its database, so one business action may require changes across several independent transactions. An order may touch inventory, payment, and order data, with no single transaction wrapping all three.
This is the distributed transaction problem.
This chapter covers why atomic updates become hard, how two-phase commit works, why it is usually a poor fit for microservices, and what pattern replaces it.