MySQL Cluster – What is a mysqld Process?

MySQLmysql-clusterndbcluster

As I know, a mysqld process is a kind of a router of a MySQl cluster. It directs requests to the right ndbd node.

Assuming I have 3 ndbd nodes on 3 different machines and I don't use replication. How many mysqld proccesses do I need? I would say one? For me its like a master-slave architecture (comparable with mongodb) But I saw configurations where each ndbd node also has one mysqld proccess.
Why?

Best Answer

When it comes to a DB Server running mysqld in a MySQL Cluster environment, the DB Server's role is known as a SQL Node.

I once described the difference between a Storage Node and a SQL Node : Does mysqld --ndb-cluster need to be run on MySQL Cluster data nodes?. In the comment section of the question, Mat Keep commented that you should look at MySQL Cluster -- Storing table data on data nodes.

In a small Cluster, I do not see any significant impact of running mysqld on a Storage Node. In a larger Cluster, I would expect SQL Nodes to be setup apart from the Data Node unless you intend to store data in physical files.

You can find additional info from the three MySQL Cluster gurus in the DBA StackExchange

Based on your comment

To be more precise, I have 3 machines which run a Data Node. Each machine has 8Gb of RAM. In total the the db should store ~50 million ~1kb records. How would you do it here?

DISCLAIMER : Not SCMCDBA Certified

Personally, I would get a fourth server and run it as the SQL Node and leave the others as Storage (Data) Nodes. Make sure the SQL node and the Data nodes have the same hardware and OS settings.

If it is a low-write DB Cluster, then you could chance it and run mysqld --ndbcluster on each Data Node (no need for a fourth server).