As Per CAP
Consistency - All nodes gave the same data
Availability means the ability to access the cluster even if a node in the cluster goes down.
Partition tolerance means that the cluster continues to function even if there is a "partition" (communication break) between two nodes (both nodes are up, but can't communicate).
But Mysql Default behaviour is master-slave or master-master.
So For, Master-Slave
- There is no Consistency as slave lag can happens and hence data read from slave is not consistent.
- There is no availability as slave cannot become master without DBA intervention.
So For, Master-Master
- There is no Consistency as slave lag can happens and hence data read from slave is not consistent.
- There is no availability as slave/other-master cannot become master without DBA intervention.
- Its partial tolerant as both will work fine in case of network failure.
Am i missing something ?
MySQL database engine reaches CAP theorem with the help of introduction of a node to balance a Cluster design. So when you have two (2) nodes, if there is a network issue between the two servers, the cluster will be split in 2 partitions. And each of it will have 50% of the amount of total members (1/2). That’s why none of the partition will reach quorum and none will allow queries. So, to get a full Partition tolerance, Cluster design needs to add a third node at least so your database reaches a partition tolerance for one failure.
Thus, cluster continues to function even if the "partition" (communication break) between two nodes (both nodes are up, but can't communicate), because one partition still has quorum (2/3 = 66%, which is bigger than 50%).