Core concepts of MySQL Clusters

Source: Internet
Author: User

MySQL Cluster Core ConceptsNDBCLUSTER (also known as NDB) is an in-memory storage engine offering high-availability and data-persistence features.
NDBCLUSTER (also called NDB) is a memory storage engine that provides high availability and data persistence features.
The NDBCLUSTER storage engine can be configured with a range of failover and load-balancing options, but it is easiest to start with the storage engine at the cluster level. MySQL Cluster's NDB storage engine contains a complete set of data, dependent only on other data within the cluster itself.
The NDBCLUSTER storage engine can be configured with a series of failover and load balancing functions. However, it is also the most easy-to-start storage engine at the cluster level. The NDB storage engine of the MySQL cluster contains a complete set of datasets, which only depends on other data in the cluster.
The “Cluster” portion of MySQL Cluster is configured independently of the MySQL servers. In a MySQL Cluster, each part of the cluster is considered to be a node.
The Cluster of the MySQL Cluster is independently configured on the MySQL service. In a MySQL cluster, each part of the cluster is considered asNode).
Note
In many contexts, the term “node” is used to indicate a computer, but when discussing MySQL Cluster it means a process. It is possible to run multiple nodes on a single computer; for a computer on which one or more cluster nodes are being run we use the term cluster host.
Note:
In most cases, the term "node" is used to represent a computer, but when discussing a MySQL cluster, it means a process. Multiple node nodes can be run on a single PC. One or more cluster nodes running on the PC are calledCluster host).
There are three types of cluster nodes, and in a minimal MySQL Cluster configuration, there will be at least three nodes, one of each of these types:
There are three types of nodes in the cluster. In the minimal MySQL cluster configuration, each type of node must have one or at least three nodes:

Management node: The role of this type of node is to manage the other nodes within the MySQL Cluster, performing such functions as providing configuration data, starting and stopping nodes, running backup, and so forth. Because this node type manages the configuration of the other nodes, a node of this type should be started first, before any other node. An MGM node is started with the command ndb_mgmd.

Management node): The task of this node is to manage other nodes in the MySQL cluster. Execute functions such as providing configuration data, opening nodes, closing nodes, and running backups. This type of node manages the configurations of other nodes, so the node should be started before other nodes. An MGM node is started using the ndb_mgmd command.

Data node: This type of node stores cluster data. There are as many data nodes as there are replicas, times the number of fragments (see Section 18.1.2, “MySQL Cluster Nodes, Node Groups, Replicas, and Partitions”). For example, with two replicas, each having two fragments, you need four data nodes. One replica is sufficient for data storage, but provides no redundancy; therefore, it is recommended to have 2 (or more) replicas to provide redundancy, and thus high availability. A data node is started with the command ndbd (see Section 18.4.1, “ndbd — The MySQL Cluster Data Node Daemon”) or ndbmtd (see Section 18.4.3, “ndbmtd — The MySQL Cluster Data Node Daemon (Multi-Threaded)”).

MySQL Cluster tables are normally stored completely in memory rather than on disk (this is why we refer to MySQL Cluster as an in-memory database). However, some MySQL Cluster data can be stored on disk; see Section 18.5.12, “MySQL Cluster Disk Data Tables”, for more information. 

Data node ):This type of node is used to store cluster data. Many data nodes have their copies, which is twice the size of the segment. For example, if two segments have two copies, you need four data nodes. A copy is sufficient for data storage, but it does not provide redundancy. Therefore, we recommend using two (or more) copies to provide redundancy for high availability. A data node is started using the ndbd or ndbmtd command.

MySQL cluster tables are usually completely stored in the memory, rather than on the hard disk (that is why we call a MySQL cluster a memory-based database ). However, some MySQL cluster data can be stored on the hard disk.

SQL node: This is a node that accesses the cluster data. In the case of MySQL Cluster, an SQL node is a traditional MySQL server that uses the NDBCLUSTER storage engine. An SQL node is a mysqld process started with the --ndbcluster and --ndb-connectstring options, which are explained elsewhere in this chapter, possibly with additional MySQL server options as well.

An SQL node is actually just a specialized type of API node, which designates any application which accesses MySQL Cluster data. Another example of an API node is the ndb_restore utility that is used to restore a cluster backup. It is possible to write such applications using the NDB API. For basic information about the NDB API, see Getting Started with the NDB API.

SQL node ):This type of node is used to access cluster data. For a MySQL cluster, an SQL node is a traditional MySQL service that uses the NDBCLUSTER storage engine. An SQL node is a process started using the -- ndbcluster and -- ndb-connectstring PARAMETERS OF THE mysqld command. This option is explained elsewhere in this chapter, other MySQL service options can also be used.

An SQL node is actually justAPI nodeThis type of node specifies any application that can access MySQL cluster data. Another example of API node is the node_restore function, which can be used to restore a cluster backup. It is possible to use NDB APIs to write applications. For basic information about NDB APIs, see Getting Started with the ndb api.

Important The Memcache API for MySQL Cluster, implemented as the loadable ndbmemcache storage engine for memcached version 1.6 and later, can be used to provide a persistent MySQL Cluster data store, accessed using the memcache protocol. The standard memcached caching engine is included in the MySQL Cluster NDB 7.3 distribution. Each memcached server has direct access to data stored in MySQL Cluster, but is also able to cache data locally and to serve (some) requests from this local cache. For more information, see ndbmemcache—Memcache API for MySQL Cluster.   Management clients. These clients connect to the management server and provide commands for starting and stopping nodes gracefully, starting and stopping message tracing (debug versions only), showing node versions and status, starting and stopping backups, and so on. An example of this type of program is the ndb_mgm management client supplied with MySQL Cluster (see Section 18.4.5, “ndb_mgm — The MySQL Cluster Management Client”). Such applications can be written using the MGM API, a C-language API that communicates directly with one or more MySQL Cluster management servers. For more information, see The MGM API.

Cluster log: Keeps a record of all desired reportable events for the cluster as a whole.

Node log: A separate log which is also kept for each individual node.

Event Log:The MySQL cluster generates logs by type (startup, shutdown, error, checkpoint, and so on), priority and severity events. You can find a complete listener for reporting events in Section 18.5.6, "Event Reports Generated in MySQL Cluster. There are two types of Event Logs:

LCluster log:For clusters, the cluster stores an expected report event record as a whole.

LNode log:A single log maintains every single node.

Note

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.