Search⌘ K
AI Features

Introduction to Distributed Transactions

Learn about distributed transactions as operations performed atomically across multiple nodes. Understand key concepts like ACID properties—atomicity, consistency, isolation, and durability—and the challenges posed by partial failures and concurrency. This lesson lays the foundation for addressing complex problems in distributed system design.

One of the most common problems faced when moving from a centralized to a distributed system is performing operations across multiple nodes in an atomic way. We call this a distributed transaction.

In the next three chapters, we explore all the complexities involved in performing a distributed transaction, and examine several available solutions for each one as well as their pitfalls.

Before diving into the available solutions, let’s first learn about transactions and their properties, and what distinguishes distributed transactions from them.

Transaction

A transaction is a unit of work performed in a database system that represents a change potentially composed of multiple operations.

Database transactions are an abstraction invented to simplify engineers’ work and relieve them of dealing with all the possible failures that the inherent unreliability of hardware introduces.

Guarantees provided by database transactions

As we have learned, the acronym ACID sums up the major guarantees that database transactions provide. As a reminder, ACID stands for the following:

  • Atomicity
  • Consistency
  • Isolation
  • Durability

Each transaction TX comprises multiple operations (op1, op2, op3, …), and multiple transactions (TX1, TX2, etc.,) are executed simultaneously in a database.

Atomicity

Atomicity is the property that guarantees that either all of the ...