0

Partition Tolerance - The system continues to operate as a whole even if individual servers fail or can't be reached.

Better definition from this link

Even if the connections between nodes are down, the other two (A & C) promises, are kept.

Now consider we have master slave model in both RDBMS(oracle) and mongodb. I am not able to understand why RDBMS is said to not partition tolerant but mongo is partition tolerant.

Consider I have 1 master and 2 slaves. In case master gets down in mongo, reelection is done to select one of the slave as Master so that system continues to operate.

Does not happen the same in RDBMS system like oracle/Mysql ?

emilly
  • 10,060
  • 33
  • 97
  • 172
  • See https://stackoverflow.com/questions/36404765/why-isnt-rdbms-partition-tolerant-in-cap-theorem-and-why-is-it-available – M Sach Jun 17 '18 at 18:21

1 Answers1

2

See this article about CAP theorem and MySQL.

Replication in Mysql cluster is synchronous, meaning transaction is not committed before replication happen. In this case your data should be consistent, however cluster may be not available for some clients in some cases after partition occurs. It depends on the number of nodes and arbitration process. So MySQL cluster can be made partition tolerant.

Partition handling in one cluster:

If there are not enough live nodes to serve all of the data stored - shutdown Serving a subset of user data (and risking data consistency) is not an option If there are not enough failed or unreachable nodes to serve all of the data stored - continue and provide service No other subset of nodes can be isolated from us and serving clients If there are enough failed or unreachable nodes to serve all of the data stored - arbitrate. There could be another subset of nodes regrouped into a viable cluster out there.

Replication btw 2 clusters is asynchronous.

Edit: MySql can be also configured as a cluster, in this case it is CP, otherwise it is CA and Partition tolerance can be broken by having 2 masters.

Dennis R
  • 1,769
  • 12
  • 13
  • 1
    `Single Mysql cluster is synchronous, meaning transaction is not committed before replication happen. In this case you data should be consistent, however cluster may be not available for some clients in some cases after partition occurs. It depends on the number of nodes and arbitration process.` It means mysql is CP and not higly available but then why it said to be not partition tolerant ? – emilly Jun 02 '18 at 01:38
  • What is described above is MySql clustered configuration. It could also be configured as Master Slave. When link between slave and master is broken, MySql can create another master, breaking partition tolerance. In this case it is CA. – Dennis R Jun 04 '18 at 13:36