MySQL Cluster --01

【MySQL Cluster】

       MySQL Cluster is the official cluster deployment solution of MySQL, which supports automatic sharding, read and write expansion, and backs up redundant data in real time. It is a highly practical and highly redundant version suitable for distributed computing environments. It is the solution with the highest availability. The official claim is that it can achieve 99.999% availability. MySQL Cluster uses the NDB Cluster storage engine, including MySQL server, NDB Cluster data nodes, management server, and (possibly) specialized data access programs.

       NDB is an "in-memory" storage engine with high availability and data consistency.

       In effect, MySQL Cluster integrates the NDB in-memory cluster storage engine with a standard MySQL server. It consists of a set of computers, each running one or more processes, which may include a MySQL server, a data node, a management server and a proprietary data access program.

        

In the MySQL cluster configuration, it consists of three services with different functions. Each service is provided by a dedicated daemon process. A service is also called a node. The functions of each node are described below:

1. Management (MGM) node

      The role of the MGM node is to manage other nodes in the MySQL Cluster, such as providing configuration data, starting and stopping nodes, and running backups. Since such nodes are responsible for managing the configuration of other nodes, they should be started before other nodes. In theory, only one is generally started, and the downtime does not affect the service of the cluster. This process only works when the cluster is started and the node joins the cluster, so this node does not need redundancy. In theory, it can provide services through a server. .
      The management server (MGM node) is responsible for managing Cluster configuration files and Cluster logs. Each node in the Cluster retrieves configuration data from the management server and requests a way to determine where the management server is located. When new events occur within the data nodes, the nodes transmit information about such events to the management server, and then write such information to the Cluster log.

2. Data Node 

      Used to save Cluster data. The number of data nodes is related to the number of replicas, and is a multiple of fragments. The number of fragments is obtained by dividing the total number of nodes by NoOfReplicas. For example, for two replicas, each replica has two fragments, then there are 4 data nodes, usually set to two replicas, the high availability guarantee of the cluster can be achieved when there are more than two replicas, and when the number of data nodes increases, the processing of the cluster Speed ​​will be slower.

3. SQL node

      Node used to access Cluster data. For MySQL Cluster, client nodes are traditional MySQL servers using the NDB Cluster storage engine. There can be multiple sql nodes in a cluster, and the data queried through each sql node is consistent. Generally speaking, the more sql nodes, the smaller the load allocated to each sql node, and the better the overall performance of the system. Okay.

 

       All these nodes form a complete MySQL cluster system: data is stored in the storage engine of the "NDB storage server", and tables (structures) are stored 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 bringing MySQL Cluster to the open source world, MySQL provides Cluster data management with high availability, performance, and scalability to all who need it.

 

[NDB storage engine]

       MySQL Cluster uses a dedicated memory-based storage engine NDB, which has the advantage of being fast and without the bottleneck of disk I/O, but because it is memory-based, the size of the database is limited by the total system memory, such as running The NDB MySQL server must have enough memory, such as 4G, 8G, or even 16G. The NDB engine is distributed. It can be configured on multiple servers to achieve data reliability and scalability. In theory, by configuring two NDB storage nodes, the redundancy of the entire database cluster can be achieved and the single point of failure problem can be solved. .

 

MySQL Cluster Features

  1. High levels of write scalability through automatic sharding: MySQL Cluster automatically shards (or partitions) tables across different nodes, allowing the database to scale horizontally on low-cost commodity hardware while remaining completely transparent to applications . 
  2. 99.999% Availability: With its distributed, shared-nothing architecture, MySQL Cluster provides 99.999% availability, ensuring strong failure resilience and the ability to perform scheduled maintenance without downtime.
  3. SQL and NoSQL API: MySQL Cluster enables users to combine the best of both relational database technology and NoSQL technology in a solution that reduces cost, risk and complexity.
  4. Real-time performance: MySQL Cluster provides real-time response time and throughput to meet the needs of the most demanding Web, telecom and enterprise applications.
  5. Multi-site clusters with geo-replication: Geo-replication enables multiple clusters to be distributed in different locations, improving disaster recovery and scalability of global Web services.
  6. Online scaling and schema upgrades: To support continuous operations, MySQL Cluster allows online addition of nodes and updates to a running database schema, thus supporting rapidly changing and highly dynamic workloads.

         shortcoming

  1. Based on memory, the size of the database is limited by the size of the total cluster memory
  2. Multiple nodes implement operations such as communication, data synchronization, and query through the network, so the integrity is affected by the network speed

       MySQL Cluster is the official cluster deployment solution of MySQL, which supports automatic sharding, read and write expansion, and backs up redundant data in real time. It is a highly practical and highly redundant version suitable for distributed computing environments. It is the solution with the highest availability. The official claim is that it can achieve 99.999% availability. MySQL Cluster uses the NDB Cluster storage engine, including MySQL server, NDB Cluster data nodes, management server, and (possibly) specialized data access programs.

       NDB is an "in-memory" storage engine with high availability and data consistency.

       In effect, MySQL Cluster integrates the NDB in-memory cluster storage engine with a standard MySQL server. It consists of a set of computers, each running one or more processes, which may include a MySQL server, a data node, a management server and a proprietary data access program.

        

In the MySQL cluster configuration, it consists of three services with different functions. Each service is provided by a dedicated daemon process. A service is also called a node. The functions of each node are described below:

1. Management (MGM) node

      The role of the MGM node is to manage other nodes in the MySQL Cluster, such as providing configuration data, starting and stopping nodes, and running backups. Since such nodes are responsible for managing the configuration of other nodes, they should be started before other nodes. In theory, only one is generally started, and the downtime does not affect the service of the cluster. This process only works when the cluster is started and the node joins the cluster, so this node does not need redundancy. In theory, it can provide services through a server. .
      The management server (MGM node) is responsible for managing Cluster configuration files and Cluster logs. Each node in the Cluster retrieves configuration data from the management server and requests a way to determine where the management server is located. When new events occur within the data nodes, the nodes transmit information about such events to the management server, and then write such information to the Cluster log.

2. Data Node 

      Used to save Cluster data. The number of data nodes is related to the number of replicas, and is a multiple of fragments. The number of fragments is obtained by dividing the total number of nodes by NoOfReplicas. For example, for two replicas, each replica has two fragments, then there are 4 data nodes, usually set to two replicas, the high availability guarantee of the cluster can be achieved when there are more than two replicas, and when the number of data nodes increases, the processing of the cluster Speed ​​will be slower.

3. SQL node

      Node used to access Cluster data. For MySQL Cluster, client nodes are traditional MySQL servers using the NDB Cluster storage engine. There can be multiple sql nodes in a cluster, and the data queried through each sql node is consistent. Generally speaking, the more sql nodes, the smaller the load allocated to each sql node, and the better the overall performance of the system. Okay.

 

       All these nodes form a complete MySQL cluster system: data is stored in the storage engine of the "NDB storage server", and tables (structures) are stored 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 bringing MySQL Cluster to the open source world, MySQL provides Cluster data management with high availability, performance, and scalability to all who need it.

 

[NDB storage engine]

       MySQL Cluster uses a dedicated memory-based storage engine NDB, which has the advantage of being fast and without the bottleneck of disk I/O, but because it is memory-based, the size of the database is limited by the total system memory, such as running The NDB MySQL server must have enough memory, such as 4G, 8G, or even 16G. The NDB engine is distributed. It can be configured on multiple servers to achieve data reliability and scalability. In theory, by configuring two NDB storage nodes, the redundancy of the entire database cluster can be achieved and the single point of failure problem can be solved. .

 

MySQL Cluster Features

  1. High levels of write scalability through automatic sharding: MySQL Cluster automatically shards (or partitions) tables across different nodes, allowing the database to scale horizontally on low-cost commodity hardware while remaining completely transparent to applications . 
  2. 99.999% Availability: With its distributed, shared-nothing architecture, MySQL Cluster provides 99.999% availability, ensuring strong failure resilience and the ability to perform scheduled maintenance without downtime.
  3. SQL and NoSQL API: MySQL Cluster enables users to combine the best of both relational database technology and NoSQL technology in a solution that reduces cost, risk and complexity.
  4. Real-time performance: MySQL Cluster provides real-time response time and throughput to meet the needs of the most demanding Web, telecom and enterprise applications.
  5. Multi-site clusters with geo-replication: Geo-replication enables multiple clusters to be distributed in different locations, improving disaster recovery and scalability of global Web services.
  6. Online scaling and schema upgrades: To support continuous operations, MySQL Cluster allows online addition of nodes and updates to a running database schema, thus supporting rapidly changing and highly dynamic workloads.

         shortcoming

  1. Based on memory, the size of the database is limited by the size of the total cluster memory
  2. Multiple nodes implement operations such as communication, data synchronization, and query through the network, so the integrity is affected by the network speed

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325023489&siteId=291194637