1. Consistency
- Every read receives most recent write / error (always latest data is read)
2. Availabiliity
- Requests are successful (system is available to handle loads)
3. Partition Tolerance
- System still works when one node fails
The CAP Trade-Off: Choosing 2 out of 3
CP (Consistency and Partition Tolerance):
- Sometimes req fails, but not halfway (Atomic but less available)
- Relational DBs: MySQL and PostgreSQL
AP (Availability and Partition Tolerance):
- Works in monoliths but not in distributed Systems
CA (Consistency and Availability):
- Low fault tolerance (bad in distributed systems)