What are Distributed ACID Transactions?
Build business-critical applications with high data integrity across multiple cloud regions and zones
Distributed ACID transactions are ACID-compliant transactions that modify multiple rows in more than one shard—usually distributed across multiple nodes. A transaction is a unit of work performed within a database, often composed of multiple operations.
Like all forms of ACID, a distributed ACID transaction has four key properties:
- Atomicity — All operations in a transaction are treated as a single atomic unit . All are performed or nothing is performed.
- Consistency — The database is always in a consistent, internal state.
- Isolation — Determines how and when changes made by one transaction become visible to others.
- Durability — Ensures all transaction results permanently remain in the system. Any modifications must persist even in case of power loss or system failures.
Distributed ACID transactions are one of the three different types of ACID transactions.
1. Single-row ACID transactions are transactions where all operations impact a single row (i.e., a key). Single-row ACID is easier to achieve as, in most distributed databases, the data for a single row doesn’t cross into other nodes.
2. Single-shard ACID transactions occur when all rows involved in the transaction’s operations exist within a single shard (which lies within a single node) of a distributed database.
3. Distributed ACID transactions impact a set of rows distributed across shards that are themselves spread across multiple nodes distributed across a data center, region or globally.
Are ACID transactions in a distributed database always distributed?
There are different types of distributed databases. The most widely-used distributed databases include common NoSQL databases such as Apache Cassandra, and distributed SQL databases, like YugabyteDB.
When supported, ACID transactions in a distributed database are not always distributed. They can be classified into three types, single-row ACID, single-shard ACID, and distributed ACID transactions (see above). Only distributed ACID transactions are fully distributed and are the default transaction for distributed SQL databases, like YugabyteDB.
Does YugabyteDB support fully distributed ACID transactions?
YugabyteDB is a high-performance distributed SQL database that supports fully distributed ACID transactions across multiple rows, multiple shards, and multiple nodes at any scale. To learn how ACID transactions work in distributed databases and how YugabyteDB makes distributed ACID transactions work without compromising on high performance, read Distributed ACID Transactions with High Performance.