Pacelc Theorem
PACELC theorem extending CAP with latency trade-offs.
In a distributed system, if a Partition occurs (P) the system must choose between Availability (A) and Consistency (C). Else (E) when there is no partition, the system must choose between Latency (L) and Consistency (C).
PACELC THEOREM
Availability
Latent but consistent: writting in both primary and replica and then returning response
not consistent but not latent: writting in both primary and returning and later on updating the replica
| System | PACELC Choice | Why | | ------------------------------------ | ------------- | -------------------------------------------------------------------------------------------------------------------------- | | **Google Spanner** | **PC/EC** | Prioritizes **strong consistency** even during normal operation. It waits for global replication before confirming writes. | | **Apache Cassandra** | **PA/EL** | Prioritizes **availability and low latency**. Writes return quickly and replicas sync later. | | **Amazon DynamoDB** | **PA/EL** | Designed for high availability and low latency at massive scale. Eventual consistency is common. | | **MongoDB (majority write concern)** | **PC/EC** | Waits for majority replica confirmation, so latency increases but consistency improves. | | **Apache CouchDB** | **PA/EL** | Focuses on availability and offline-friendly replication, so eventual consistency is used. |