During a network partition you must choose consistency or availability; PACELC adds the latency-vs-consistency choice when there is no partition.
The problem
Replicated systems communicate over networks that drop and delay messages. CAP says what you must give up when that happens, so you can choose deliberately instead of discovering it during an outage.
How it works
- C = linearizability (every read sees the latest write); A = every non-failing node answers every request; P = the system keeps working when the network splits nodes into groups.
- Partitions are not optional in a real network, so the real choice is CP vs AP *during a partition*: refuse some requests (CP) or answer with possibly stale/divergent data (AP).
- Without a partition you can have both C and A — CAP says nothing about normal operation.
- PACELC: if Partition, choose Availability or Consistency; Else, choose Latency or Consistency. Even with no partition, strong consistency costs a round trip to a quorum.
- Classification is per-operation and tunable, not per-database: Cassandra at QUORUM behaves CP-ish, at ONE AP-ish.
- CAP's “consistency” is not ACID's “consistency”, and “availability” is a stricter definition than uptime.
In real systems
- etcd / ZooKeeper / Consul — CP / PC-EC: minority side of a partition cannot serve writes (or linearizable reads).
- Cassandra / DynamoDB / Riak — AP / PA-EL by default: accept writes on both sides, reconcile later; tunable per query.
- Spanner — CP (PC-EC) but engineered for very high availability with Paxos groups and TrueTime.
- MongoDB — PA-EC by default: primary election pauses writes during partition; readConcern/writeConcern tune the trade-off.
- Kafka — unclean.leader.election.enable=true picks availability over consistency; false (default) picks consistency.
Trade-offs
Pros
- CP: no stale reads or divergent state, simpler application logic
- AP: stays writable on both sides of a partition, lower latency
Cons
- CP: minority partitions are unavailable; every write pays a quorum round trip
- AP: applications must tolerate stale reads and resolve conflicts