CAP theorem
The CAP theorem states that in a distributed system, you can achieve at most two out of the three properties—Consistency, Availability, and Partition Tolerance.
CP (Consistency and Partition Tolerance): In this scenario, the system ensures data consistency even in the presence of network partitions, but this might lead to temporary unavailability of some nodes during partitions.
CA (Consistency and Availability): Here, data consistency is maintained, and the system remains available, but during network partitions, some nodes might become unreachable, affecting overall availability.
AP (Availability and Partition Tolerance): The system prioritizes availability and continues to operate during network partitions, potentially leading to temporary inconsistencies in the data seen by different nodes.
CP when one node is disconnect, api will response error(not avaiable).
AP when one node is disconnect, data might diff from each node(doesn't update the broken node).
CA always consistency + available = only one node which against distributed system.