Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

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?
share|improve this question

migrated from serverfault.com Dec 18 '11 at 16:26

This question came from our site for professional system and network administrators.

add comment

3 Answers 3

up vote 2 down vote accepted

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

share|improve this answer
    
thank you! i have many small transactions! this is exactly what i need :) –  ufk Dec 27 '11 at 15:15
add comment

The data node marked as 'Master' in the output from the ndb_mgm show command is the coordinator of some cluster internal management tasks. For example, it coordinates changes to the distributed dictionary due to DDL commands, and manages node join and leave transactions. The 'Master' role is dynamic, and is generally assigned to the longest running data node in a cluster, only moving when that node fails.

The 'Master' role is completely unrelated to the 'Master/Slave' concept in MySQL replication, and also has no bearing on the replication of data between nodes within a cluster. Perhaps it would be better if it were called 'Coordinator' or 'Leader'. As you say, you do not need to worry about which data nodes are used by MySQLD, all are equivalent for most operations and it is handled automatically.

share|improve this answer
add comment

To answer your specific question: master in this context means that it is this specific node that coordinates checkpoints and schema modification (create/drop/alter table)

responsibility for data is shared equally on all nodes. responsibility for transaction coordination is also shared equally on all nodes.

In terms of where it is used, MySQL Cluster is well proven in a range of web, telecoms, government use cases, and these are expanding with the 7.2 release (currently in a development release) with support for much faster complex JOIN performance, native memcached API, new geo-replication options

There is more on 7.2 here: http://dev.mysql.com/tech-resources/articles/mysql-cluster-7.2.html

and a list of current customer use cases (those we are allowed to speak about publicly here): http://mysql.com/customers/cluster/

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.