CAP and ACID
The CAP Theorem postulates that a distributed system can only guarantee two of the following properties: consistency, availability, and partition-tolerance. Since network partitions are inevitable, a distributed database can be either in available and partition tolerant (AP) mode or consistent and partition tolerant (CP) mode.
An Aerospike Database cluster can support different consistency configurations for different namespaces.
Aerospike provides atomicity in single-record transactions - multiple operations can be executed on the bins of a record such that all of them apply, or all changes are rolled back on error. These operations are also isolated - while the record is being modified it is locked, so no dirty reads occur.
Aerospike ensures durability in several ways:
- When a namespace uses a replication factor of 2 or more, writes are committed to multiple physical servers with independent hardware components. A rack aware configuration goes further to isolate the copies of the record to distinct availability zones.
- Server configuration to control the frequency by which records are flushed to persistent storage for low throughput workloads.
- Alternatively, in strong consistency mode the server can be configured to commit every record version to a persistent storage device immediately.
ACID, however, typically also implies multi-record atomicity, isolation and consistency, which Aerospike does not yet provide. Multi-record transactions with strict serializability guarantees are in-development.
For more information, see these details on strong consistency.