MySQL Cluster (MySQL cluster) preliminary

Source: Internet
Author: User
Tags mysql client versions

MySQL Cluster is a highly functional, highly redundant version of MySQL for distributed computing environments. It employs a NDB Cluster storage engine that allows multiple MySQL servers to run in 1 Cluster. The storage engine is available in binary versions of MYQL 5.0 and above, and in RPM compatible with the latest Linux version. (Note that mysql-server and Mysql-max RPM must be installed to get the functionality of the MySQL Cluster.)

The operating system currently capable of running MySQL Cluster has Linux, Mac OS x, and Solaris (some user notifications have successfully run MySQL Cluster on FreeBSD, but MySQL AB has not officially supported this feature).

A, MySQL cluster overview

MySQL Cluster is a technology that allows the deployment of Cluster in an in-memory database on a system that is not shared. With no shared architecture, the system can use inexpensive hardware and no special requirements for hardware and software. In addition, because each component has its own memory and disk, there is no single point of failure.

The MySQL Cluster consists of a group of computers running multiple processes on each computer, including MySQL servers, NDB Cluster data nodes, Management servers, and (possibly) specialized data access programs. For the relationship of these components in Cluster, see the following figure:

All of these nodes constitute 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 Administrative Tools (NDB_MGMD).

By introducing MySQL Cluster into the open source world, MySQL provides Cluster data management with high availability, high performance, and scalability for all who need it.

Second, the MySQL Cluster basic concept

"NDB" is an "in-memory" storage engine that features high availability and good data consistency.

The MySQL Cluster is able to configure the NDB storage engine with multiple failover and load balancing options, but this is easiest to do on the storage engine at the Cluster level. The MySQL cluster NDB storage engine contains the complete dataset, depending only on other data within the cluster itself.

Currently, the cluster part of the MySQL cluster can be configured independently of the MySQL server. In the MySQL cluster, each part of cluster is treated as 1 nodes.

Management (MGM) node: the role of such nodes is to manage other nodes within the MySQL cluster, such as providing configuration data, starting and stopping nodes, running backups, and so on. Since such nodes are responsible for managing the configuration of other nodes, you should start these nodes first before starting other nodes. The MGM node was started with the command "NDB_MGMD". Data nodes: This type of node is used to hold cluster data. The number of data nodes is associated with the number of replicas, which is a multiple of fragments. For example, for two replicas, each copy has two fragments, and then there are 4 data nodes. However, there is no need to set up multiple replicas. The data node is started with the command "NDBD". SQL node: This is the node that is used to access the cluster data. For MySQL Cluster, the client node is a traditional MySQL server that uses the NDB Cluster storage engine. Typically, the SQL node is started using the command "Mysqld–ndbcluster" or "mysqld" when "Ndbcluster" is added to "my.cnf".

Note: In many cases, the term "node" is used to refer to a computer, but when discussing MySQL cluster, it represents a process. There can be any number of nodes on a single computer, so we use the term "cluster host".

The Management Server (MGM node) is responsible for managing cluster configuration files and cluster logs. Each node in the cluster retrieves the configuration data from the Management Server and requests a way to determine where the Management server resides. When new events occur within the data node, the node transmits information about such events to the Management Server, and then writes such information to the cluster log.

In addition, you can have any number of cluster client processes or applications. They fall into two categories:

Standard MySQL client: for MySQL Cluster, they are no different from standard (Cluster class) MySQL. In other words, you can access the MySQL Cluster from existing MySQL applications written in PHP, Perl, C, + +, Java, Python, Ruby, and so on. Managing clients: This type of client is connected to the Management Server and provides commands for starting and stopping nodes, starting and stopping message tracking (Debug versions only), displaying node versions and status, starting and stopping backups, and so on.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.