MySQLCluster is a highly practical and redundant MySQL version suitable for distributed computing environments. It uses the NDBCluster storage engine and allows multiple nodes to run in one Cluster.
MySQL Cluster is a highly practical and redundant MySQL version suitable for distributed computing environments. It uses the NDB Cluster Storage engine and allows multiple nodes to run in one Cluster.
1 MySQL Cluster
MySQL Cluster is a highly practical and redundant MySQL version suitable for distributed computing environments. It uses the NDB Cluster Storage engine and allows multiple MySQL servers to run in one Cluster. This storage engine is available in MySQL 5.0 and later binary versions, and in RPM compatible with the latest Linux version. (Note: To obtain the functions of MySQL Cluster, you must install mysql-server and mysql-max RPM ).
Currently, the operating systems that can run MySQLCluster include Linux, Mac OS x, and Solaris (some users have reported that MySQL Cluster has been successfully run on FreeBSD, but MySQL AB does not yet officially support this feature ).
1.1 MySQL Cluster Overview
MySQL Cluster is a technology that allows you to deploy the "in memory" Database Cluster in a non-shared system. Without a shared architecture, the system can use cheap hardware without special requirements for hardware and software. In addition, since each component has its own memory and disk, there is no single point of failure.
MySQL Cluster is composed of a group of computers, each of which runs a variety of processes, including MySQL servers, NDB Cluster data nodes, management servers, and (possibly) dedicated Data Access Program. For the relationship between these components in the Cluster, see:
All these nodes form a complete MySQL cluster system. The data is stored in the storage engine of the "NDB storage server", and the table (structure) is saved in the "MySQL server. Applications access these data tables through the "MySQL Server", and the cluster management server manages the "NDB storage server" through the management tool (ndb_mgmd ".
By introducing MySQLCluster into the open source world, MySQL provides Cluster data management with high availability, high performance, and scalability for all people who need it.
1.2 Basic concepts of MySQL Cluster
"NDB" is a "in-memory" storage engine with high availability and good data consistency.
MySQL Cluster can use a variety of failover and load balancing options to configure the NDB storage engine, but it is the easiest to do this on the storage engine at the Cluster level. The NDB storage engine of MySQL Cluster contains a complete data set, which depends only on other data in the Cluster.
Currently, the Cluster of MySQLCluster can be configured independently of the MySQL server. In MySQL Cluster, each part of the Cluster is considered as one node.
Management (MGM) nodes: these nodes manage other nodes in the MySQL Cluster, such as providing configuration data, starting and stopping nodes, and running backups. Because these nodes are responsible for managing the configurations of other nodes, they should be started before other nodes are started. The MGM node is started with the command "ndb_mgmd.
Data nodes: these nodes are used to save Cluster data. The number of data nodes is related to the number of copies, which is a multiple of the segments. For example, if two copies have two segments, each of them has four data nodes. However, there is no need to set multiple copies. The data node is started with the "ndbd" command.
SQL node: This is the node used to access Cluster data. For MySQL Cluster, the client node is a traditional MySQL server that uses the NDB Cluster Storage engine. Generally, an SQL node is started with the command "mysqld-ndbcl uster", or "ndbcluster" is added to "my. cnf" and then started with "mysqld.
Note: in many cases, the term "Node" is used for computers, but when discussing MySQL Cluster, it represents a process. A single computer can have any number of nodes. Therefore, we use the term "Cluster host ".
1.3 Management Server (MGM node)
Manages Cluster configuration files and Cluster logs. Each node in the Cluster retrieves configuration data from the Management Server and requests to determine the location of the management server. When a new event occurs in the data node, the node transmits the information about the event to the management server, and then writes the information to the Cluster log.
In addition, there can be any number of Cluster client processes or applications. They are divided into two types:
Standard MySQL clients: For MySQL clusters, they are no different from standard (non-Cluster) MySQL. In other words, you can access the MySQL Cluster from existing MySQL applications written in PHP, Perl, C, C ++, Java, Python, and Ruby.
Management clients: these clients are connected to the Management Server and provide the ability to start and stop nodes, start and stop message tracing (only DEBUG Versions) displays the node version and status, starts and stops the backup, and other commands.