Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the knowledge points of MySQL cluster NDB 7.5

2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly introduces "what are the knowledge points of MySQL cluster NDB 7.5". In the daily operation, I believe many people have doubts about what knowledge points MySQL cluster NDB 7.5 has. The editor consulted all kinds of materials and sorted out simple and easy-to-use methods of operation. I hope it will be helpful to answer the questions of "what knowledge points does MySQL cluster NDB 7.5 have?" Next, please follow the editor to study!

MySQL Cluster is a technology that enables in-memory database clustering in shared-nothing systems. Shared-nothing architecture enables the system to work with cheap hardware with little demand for hardware and software.

MySQL clusters are designed without any single point of failure. In a shared-nothing system, each node has its own memory and hard disk. Shared storage mechanisms such as shared network, network questionnaire system and SAN storage are not recommended and supported by MySQL clusters.

MySQL clusters are integrated with standard MySQL servers through a memory cluster storage engine called NDB. NDB is the abbreviation of Network DataBase. MySQL cluster is a combination of MySQL server and NDB storage engine.

A set of MySQL clusters consists of a series of computer hosts, each running one or more processes; these processes are called nodes, including MySQL servers (used to access NDB data), data nodes (used to store data), one or more management servers, and other custom data access programs. The diagrams of these nodes are as follows:

The nodes in the cluster can be stopped or restarted, or they can join the cluster again.

NDBCLUSTER (also known as NDB) is a memory storage engine that provides high availability and data persistence.

NDBCLUSTER can achieve failover and load balancing by configuring some parameters. It is important to note that in a MySQL cluster, a node refers to a host, but a process; multiple nodes can be run on a single host.

In a MySQL cluster configuration, there are at least three nodes:

Administrative node: the role of this node is to manage other nodes in the cluster, provide configuration data, start the stop node, and perform backup functions. Because this node manages the configuration information of other nodes, you should start this node first in the cluster. Start the MGM node with the ndb_mgmd command.

Data nodes: this type of node stores the data of the cluster. Tables in a MySQL cluster are usually kept in memory rather than on disk (which is why we call a MySQL cluster an in-memory database). However, some MySQL cluster data can also be stored on disk.

SQL nodes: these nodes are used to access cluster data. In a MySQL cluster, the SQL node is a traditional MySQL server that uses the NDBCLUSTER storage engine. The SQL node is started in mysqld-- ndbcluster-- ndb-connectstring mode.

In a production environment, it is not realistic to deploy a set of three-node MySQL clusters because such a configuration does not provide redundancy protection. To achieve high availability of MySQL clusters, multiple data nodes and SQL nodes need to be deployed, and multiple management nodes are recommended.

The management server is responsible for managing the configuration and cluster logs of the cluster. Each cluster node reads the configuration information on the management server.

In addition, in addition to the above nodes, there are cluster client processes and applications, including standard MySQL clients, NDB-specific API programs, and administrative clients.

The MySQL cluster has two types of logs:

Cluster log: record event reports for the cluster

Node log: a separate log for each node

In general, you only need to check the cluster log, and the node log checkpoint is only used when developing an application or troubleshooting. In general, a checkpoint is triggered when the data is saved to disk. In a MySQL cluster, checkpoints are triggered when committed transaction data is saved to disk. For the NDB storage engine, there are two types of checkpoints that work together to ensure the consistency of the cluster data.

Local checkpoint (LCP): this is a checkpoint above a separate node. A local checkpoint saves all the data on the local node to disk and is triggered every few minutes. The time interval for triggering the checkpoint depends on the amount of data on the node, the activity level of the cluster, and other factors.

Global checkpoint (GCP): a global checkpoint occurs every few seconds when transactions on all nodes are synchronized and log files are flushed to disk.

A data node is a ndbd process, and each data node needs to be deployed to a different host. MySQL clusters do not support the deployment of multiple ndbd processes on the same host.

[root@dongdan ~] # ps-ef | grep ndbd

Root 23759 1 0 Aug03? 00:00:00 ndbd

Root 23760 23759 0 Aug03? 00:24:05 ndbd

Root 31446 31395 0 13:46 pts/2 00:00:00 grep ndbd

The process of managing the node is the ndb_mgmd process, and the process of the SQL node is the mysqld process.

[root@dongdan ~] # ps-ef | grep mysqld

Root 23833 1 0 Aug03? 00:00:00 / bin/sh / usr/bin/mysqld_safe-- defaults-file=/var/lib/mysql/main_my.cnf

Mysql 24051 23833 0 Aug03? 00:36:04 / usr/sbin/mysqld-defaults-file=/var/lib/mysql/main_my.cnf-basedir=/usr-datadir=/var/lib/mysql/database-plugin-dir=/usr/lib64/mysql/plugin-user=mysql-log-error=/var/lib/mysql/database/dongdan.err-pid-file=/var/lib/mysql/database/dongdan.pid-socket=/var/lib/mysql/mysql.sock-port=3306

Root 31464 31395 0 13:50 pts/2 00:00:00 grep mysqld

A node group contains one or more nodes.

MySQL cluster uses heartbeat and timeout mechanism, when one of the nodes can not be connected to the network, it will determine that the node fails.

At this point, the study on "what are the knowledge points of MySQL cluster NDB 7.5" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report