netok netok - 7 months ago 64
SQL Question

Is CAP theorem wrong?

CAP theorem definition taken from Wikipedia:

It is impossible for a distributed computer system to simultaneously provide all three of the following guarantees:

  • Consistency (every read receives the most recent write or an error)

  • Availability (every request receives a response, without guarantee that it contains the most recent version of the information)

  • Partition tolerance (the system continues to operate despite arbitrary partitioning due to network failures)

My thought:

For any system with CA, they can operate normally without partition. When partition exists, the system can fall back to CP or AP, which can continue to operate. Since the system can continue to operate, it also fulfill P. Therefore, any CA system is also a CAP system. Thus the claim that it is impossible for all CAP to coexist in a system is wrong.

usr usr

C and A mean that the system provides these guarantees in the face of partitions. So abandoning these properties during a partition makes the property not hold.

The CA trade-off is only relevant during a partition (because without partitions we can give up P and obtain CA). Then, you need to decide.

The practically relevant choices are CP vs. AP since partitions can always happen.