openskills.info
Course Preview

Distributed Transactions

Distributed transactions coordinate writes across multiple databases or services so they either all commit or all abort, maintaining data consistency. They introduce protocols like two-phase commit and saga patterns that trade off between consistency, availability, and complexity.

itDistributed systems, messaging, and integration

Distributed Transactions

A local database transaction gives one system a clear boundary. All of its changes commit, or none of them do. That promise becomes harder when one business operation crosses databases, message brokers, or independently deployed services.

A distributed transaction coordinates changes across more than one transactional resource. The central question is not how to send several requests. It is how every participant reaches a safe final outcome when messages, processes, or machines fail.

Consider an order that reserves inventory and records a payment. A crash after only one change can leave the business state inconsistent. Retrying the whole request can create a second payment. Waiting forever can preserve safety while making the order unavailable.

Distributed transaction design is therefore a choice among guarantees, failure behavior, latency, coupling, and operational cost.

The core mental model

Separate the business operation from each local transaction.

  • The business operation describes the outcome you need, such as placing an order.
  • A local transaction commits changes inside one resource manager.
  • A coordination protocol connects those local outcomes.
  • Recovery logic decides what happens after partial progress or uncertain communication.

The network creates an ambiguity that local code cannot remove. After sending a commit request, a coordinator might lose the reply. The participant may have committed, or the request may never have arrived. A timeout reports uncertainty, not the transaction outcome.

That uncertainty drives the two main families of designs:

Continue the course

This section is part of the paid course.

See pricing to subscribe, or log in if you already have access.

Where this skill leads

Relevant careers

See how this topic contributes to broader role-level skill maps.

Sources