Starting a Cluster#
Cluster Start Ordering#
The order of starting is always as follows:
ndb_mgmd: Management servers (MGMd)
ndbmtd: Data nodes
mysqld: MySQL servers
rdrs: REST API servers (optional)
Each node type can be started in parallel. Rolling restarts after configuration changes or due to software upgrades are also performed in this order - however, it is safer to restart nodes of a node type in serial then.
Concept of NDB Connect String#
A central component of connecting to the cluster is the NDB Connect String, sometimes also called management connection string.
Any node type starting up will want to connect to the cluster with this string:
Management server connects to running Management server
Data node connects to running Management server
MySQLd / API node connects to running Management server
The format of the connect string is a CSV list of MGMd addresses.
The default port of the management server is 1186 and can be omitted if
it has not been specified otherwise using
PortNumber in the
configuration file. Specifying one running MGMd address is enough -
multiple addresses are however more resilient to failure.
Any RonDB program can use the connect string in the following ways:
Naming Files and Directories#
To allow multiple RonDB programs of the same node type to run on the
same machine, RonDB names its directories and files (including .pid
files) using the Node ID of the corresponding program. If this causes
an inconvenience, one can start the program with the
parameter. This will then be used as a filename identifier instead.
An example of such an inconvenience is when one uses a process manager like systemd to run RonDB programs. Systemd might require the .pid file paths in its configuration files to be able to stop the programs. It may however be cumbersome to template the systemd files with the correct .pid file names.