- 25.2.1 NDB 集群核心概念25.2.1 NDB Cluster Core Concepts
- 25.2.2 NDB 集群节点、节点组、片段副本和分区25.2.2 NDB Cluster Nodes, Node Groups, Fragment Replicas, and Partitions
- 25.2.3 NDB 集群硬件、软件和网络要求25.2.3 NDB Cluster Hardware, Software, and Networking Requirements
- 25.2.4 MySQL NDB 集群 8.4 中的新特性25.2.4 What is New in MySQL NDB Cluster 8.4
- 25.2.5 NDB 8.4 中新增、弃用或移除的选项、变量和参数25.2.5 Options, Variables, and Parameters Added, Deprecated or Removed in NDB 8.4
- 25.2.6 使用 InnoDB 的 MySQL 服务器与 NDB 集群相比25.2.6 MySQL Server Using InnoDB Compared with NDB Cluster
- 25.2.7 NDB 集群的已知限制25.2.7 Known Limitations of NDB Cluster
NDB Cluster 是一项技术,可在无共享架构系统中实现内存数据库的集群。无共享架构使系统能够使用非常廉价的硬件运行,并且对硬件或软件的具体要求最小。NDB Cluster is a technology that enables clustering of in-memory databases in a shared-nothing system. The shared-nothing architecture enables the system to work with very inexpensive hardware, and with a minimum of specific requirements for hardware or software.
NDB 集群的设计不依赖任何单点故障。在无共享系统中,每个组件都应该拥有自己的内存和磁盘,并且不建议或支持使用共享存储机制,如网络共享、网络文件系统和存储区域网络(SAN)。NDB Cluster is designed not to have any single point of failure. In a shared-nothing system, each component is expected to have its own memory and disk, and the use of shared storage mechanisms such as network shares, network file systems, and SANs is not recommended or supported.
NDB 集群将标准 MySQL 服务器与一种名为 NDB(即 “Network DataBase”)的内存集群存储引擎集成。在我们的文档中,术语 NDB 指的是与存储引擎相关的特定部分,而 “MySQL NDB Cluster” 指的是一个或多个 MySQL 服务器与 NDB 存储引擎的组合。NDB Cluster integrates the standard MySQL server with an in-memory
clustered storage engine called NDB
(which stands for “Network
DataBase”). In our
documentation, the term NDB refers to
the part of the setup that is specific to the storage engine,
whereas “MySQL NDB Cluster” refers to the combination
of one or more MySQL servers with the
NDB storage engine.
NDB 集群由一组计算机构成,这些计算机称为 主机,每台主机运行一个或多个进程。这些进程称为 节点,可能包括 MySQL 服务器(用于访问 NDB 数据)、数据节点(用于存储数据)、一个或多个管理服务器,以及可能的其他专用数据访问程序。NDB 集群中这些组件的关系如下所示:An NDB Cluster consists of a set of computers, known as hosts, each running one or more processes. These processes, known as nodes, may include MySQL servers (for access to NDB data), data nodes (for storage of the data), one or more management servers, and possibly other specialized data access programs. The relationship of these components in an NDB Cluster is shown here:
所有这些程序协同工作,形成一个 NDB 集群(参见 第 25.5 节,“NDB 集群程序”)。当数据由 NDB 存储引擎存储时,表(以及表数据)存储在数据节点中。这些表可以被集群中的所有其他 MySQL 服务器(SQL 节点)直接访问。因此,在一个将数据存储在集群中的工资应用程序中,如果一个应用程序更新了某个员工的工资,查询该数据的所有其他 MySQL 服务器都可以立即看到这一更改。All these programs work together to form an NDB Cluster (see
Section 25.5, “NDB Cluster Programs”. When data is stored by the
NDB storage engine, the tables (and
table data) are stored in the data nodes. Such tables are directly
accessible from all other MySQL servers (SQL nodes) in the cluster.
Thus, in a payroll application storing data in a cluster, if one
application updates the salary of an employee, all other MySQL
servers that query this data can see this change immediately.
NDB Cluster 8.4 的 SQL 节点使用 mysqld 服务器守护进程,这与 MySQL Server 8.4 发行版中提供的 mysqld 相同。你应该记住,任何版本的 mysqld 实例,如果未连接到 NDB Cluster,都无法使用 NDB 存储引擎,也无法访问任何 NDB Cluster 数据。An NDB Cluster 8.4 SQL node uses the
mysqld server daemon, which is the same as the
mysqld supplied with MySQL Server
8.4 distributions. You should keep in mind that
an instance of mysqld, regardless of
version, that is not connected to an NDB Cluster cannot use the
NDB storage engine and cannot access
any NDB Cluster data.
存储在 NDB Cluster 数据节点中的数据可以被镜像;集群可以处理单个数据节点的故障,其影响仅限于由于事务状态丢失而中止少量事务。因为事务型应用程序预计能够处理事务失败,所以这不应该成为问题的来源。The data stored in the data nodes for NDB Cluster can be mirrored; the cluster can handle failures of individual data nodes with no other impact than that a small number of transactions are aborted due to losing the transaction state. Because transactional applications are expected to handle transaction failure, this should not be a source of problems.
可以停止并重新启动单个节点,然后让其重新加入系统(集群)。滚动重启(即依次重启所有节点)用于进行配置更改和软件升级(参见 第 25.6.5 节,“执行 NDB 集群的滚动重启”)。滚动重启也用于在线添加新数据节点的过程中(参见 第 25.6.7 节,“在线添加 NDB 集群数据节点”)。有关数据节点、它们在 NDB 集群中的组织方式以及如何处理和存储 NDB 集群数据的更多信息,请参见 第 25.2.2 节,“NDB 集群节点、节点组、碎片副本及分区”。Individual nodes can be stopped and restarted, and can then rejoin the system (cluster). Rolling restarts (in which all nodes are restarted in turn) are used in making configuration changes and software upgrades (see Section 25.6.5, “Performing a Rolling Restart of an NDB Cluster”). Rolling restarts are also used as part of the process of adding new data nodes online (see Section 25.6.7, “Adding NDB Cluster Data Nodes Online”). For more information about data nodes, how they are organized in an NDB Cluster, and how they handle and store NDB Cluster data, see Section 25.2.2, “NDB Cluster Nodes, Node Groups, Fragment Replicas, and Partitions”.
使用 NDB Cluster 管理客户端中提供的 NDB 原生功能以及 NDB Cluster 发行版中包含的 ndb_restore 程序,可以对 NDB Cluster 数据库进行备份和恢复。有关更多信息,请参阅 第 25.6.8 节,“NDB Cluster 的在线备份”,以及 第 25.5.23 节,“ndb_restore — 恢复 NDB Cluster 备份”。您还可以使用 MySQL 服务器中提供的标准 MySQL 功能来实现此目的,例如 mysqldump。有关更多信息,请参阅 第 6.5.4 节,“mysqldump — 数据库备份程序”。Backing up and restoring NDB Cluster databases can be done using the
NDB-native functionality found in the NDB Cluster
management client and the ndb_restore program
included in the NDB Cluster distribution. For more information, see
Section 25.6.8, “Online Backup of NDB Cluster”, and
Section 25.5.23, “ndb_restore — Restore an NDB Cluster Backup”. You can also
use the standard MySQL functionality provided for this purpose in
mysqldump and the MySQL server. See
Section 6.5.4, “mysqldump — A Database Backup Program”, for more information.
NDB 集群节点可以使用不同的传输机制进行节点间通信;在大多数实际部署中,使用标准 100 Mbps 或更高速以太网硬件上的 TCP/IP。NDB Cluster nodes can employ different transport mechanisms for inter-node communications; TCP/IP over standard 100 Mbps or faster Ethernet hardware is used in most real-world deployments.
