Mysql – What’s the difference between master and slave nodes in MySQL Cluster

MySQLndbcluster

I use MySQL Cluster 7.1.15a.

I have 2 nodes, ndb_mgm -e shows:

[ndbd(NDB)]     2 node(s)
id=3    @X  (mysql-5.1.56 ndb-7.1.15, starting, Nodegroup: 0, Master)
id=4    @Y  (mysql-5.1.56 ndb-7.1.15, starting, Nodegroup: 0)

(ignore the starting state, i just started the cluster)

Node id 3 is Master

  • What does it mean ?
  • What is the difference between Master and Slave nodes ?

I connect using mysql node anyhow, so I don't choose to which data node to connect.

  • Do writes happens on the Master and reads on the Slave?
  • When I connect to the mysql node, does that happen transparently?

Best Answer

there are not Masters/Slaves in Cluster, the nodes are all active. That Master label is an internal thing and you don't have to take care about it.

@Tom: are you sure you know mysql cluster? To be a specific use case doesn't mean to be "strange". To be more precise, MySQL Cluster gives the best when you have a huge amount of small transactions, since is a parallel database. If you have a small number of big transactions, if not for you. But if you have small transactions you can distribute them between the nodes.

Massimo