Detailed MySQL Cluster MySQL Cluster principle principle Detailed

Detailed principles of MySQL Cluster

1. Why do you need a distributed database

    With the rapid development and popularization of computer and information technology, the scale of the rapid expansion of industry applications, the amount of data generated by the application industry is exploding, frequently hundreds or even hundreds of TB PB scale, far beyond the existing traditional computing and information processing capacity of the system, and a centralized database to face large-scale data processing gradually showed its limitations, so people want to find a quick and timely response to the data processing method for users to access, but also hope centralized data analysis, management and maintenance. This has become the urgent needs of the real world.

    Distributed database is developed on the basis of a centralized database on the computer network technology and technical products. Data distribution means distributed database and logical centralized database system physically. Refers to the distribution of the data is physically distributed across the distributed database node or site by different physical locations of network connections; refers to a logically centralized database logically between a whole, by the unified management of the database management system . Different nodes distributed across different rooms, cities and even countries.

    The main features of the distributed database is as follows:

  1. Transparency: users do not care about the details of the distribution of logical partitions and physical location of the data, do not care about duplicate copies (redundant data) Coherence, without having to be concerned about what kind of data models on a local site database support. For system development engineer, when data is moved from one site to another site is not necessary to rewrite the application, to use as a centralized database.
  2. Data Redundancy: distributed database system for implementing redundant reliability, availability, and to improve its performance. Storing copies of the plurality of data nodes, a node when the data is destroyed, redundant copies can ensure data integrity; nodes operating when damaged, can be switched by mechanisms such as the heartbeat, the whole system is not destroyed . Principle can also be reduced by analyzing the nearest hotspot network communication data consumption, faster access, improve performance.
  3. Ease of expansion: in the distributed database can be easily extended by a horizontal overall system performance is improved, but also through the vertical extensions to provide performance, extended without modifying the system program.
  4. Autonomy: the data on each node by the local DBMS management, automatic processing capability, to complete the application or topical application of this site.

2. MySQL Cluster principle

    MySQL MySQL Cluster is suitable for distributed computing environments highly available, high redundancy version. It uses the NDB Cluster storage engine, it allows centralized in a group to run multiple MySQL servers. In the binary version of MySQL 5.0 and above, and in compatible with the latest version of the Linux RPM package provides the storage engine.

    MySQL Cluster is a technology that allows the deployment of "memory" and "disk" Cluster database in a shared-nothing system. By the shared-nothing architecture, the system can use inexpensive hardware, and no special requirements on hardware. In addition, because each component has its own memory and disk, there is no single point of failure. MySQL Cluster is composed of a group of computers, each computer runs on a variety of processes including MySQL servers, NDB Cluster data nodes, management servers, and dedicated data access program (possible).

Management server (MGM node) manages the Cluster configuration files, and Cluster log. Each node in the Cluster configuration data retrieved from the management server.

When a new event occurs within the data nodes, the nodes transfer information about these events to the management server, then this type of information is written Cluster log.

Currently operating system to run MySQL Cluster are Linux, Mac OS X and Solaris, the latest version has support for the Windows operating system.

MySQL data communication between the nodes of the cluster is not encrypted, and requires high-speed bandwidth, it is proposed to establish a cluster in a high-speed LAN, not recommended for inter-network segment, across the public network to deploy this system architecture.

 

MySQL Cluster is divided into three nodes: the management node, data node and SQL node.

Management node: mainly used to manage each node, a node can be restarted on command, shut down, start the operation. It is possible to monitor the working status of all nodes.

Data node: mainly the storage of data and does not provide other services.

SQL node: The main function is to provide external SQL, similar to an ordinary MySQL Server.

The SQL nodes and data nodes can be the same machine, that machine that is the SQL node is a data node. They just divided on logic, actual deployment, even all of the stages can be located on the same physical machine, but the more complicated configuration.

 

3. MySQL Cluster advantages and disadvantages

advantage:

  1. 99.999% availability
  2. Fast automatic failover
  3. Flexible distributed architecture with no single point of failure
  4. High throughput and low latency
  5. Scalability, support for online capacity expansion

Disadvantages:

  1. There are many limitations, such as: foreign keys are not supported, the data line can not exceed 8K (not included in the text data and BLOB)
  2. Deploy, manage, configure very complex
  3. Occupy large disk space, large memory
  4. Backup and recovery is not convenient
  5. Restart when the data node will load data into memory takes a long time

1. Why do you need a distributed database

    With the rapid development and popularization of computer and information technology, the scale of the rapid expansion of industry applications, the amount of data generated by the application industry is exploding, frequently hundreds or even hundreds of TB PB scale, far beyond the existing traditional computing and information processing capacity of the system, and a centralized database to face large-scale data processing gradually showed its limitations, so people want to find a quick and timely response to the data processing method for users to access, but also hope centralized data analysis, management and maintenance. This has become the urgent needs of the real world.

    Distributed database is developed on the basis of a centralized database on the computer network technology and technical products. Data distribution means distributed database and logical centralized database system physically. Refers to the distribution of the data is physically distributed across the distributed database node or site by different physical locations of network connections; refers to a logically centralized database logically between a whole, by the unified management of the database management system . Different nodes distributed across different rooms, cities and even countries.

    The main features of the distributed database is as follows:

  1. Transparency: users do not care about the details of the distribution of logical partitions and physical location of the data, do not care about duplicate copies (redundant data) Coherence, without having to be concerned about what kind of data models on a local site database support. For system development engineer, when data is moved from one site to another site is not necessary to rewrite the application, to use as a centralized database.
  2. Data Redundancy: distributed database system for implementing redundant reliability, availability, and to improve its performance. Storing copies of the plurality of data nodes, a node when the data is destroyed, redundant copies can ensure data integrity; nodes operating when damaged, can be switched by mechanisms such as the heartbeat, the whole system is not destroyed . Principle can also be reduced by analyzing the nearest hotspot network communication data consumption, faster access, improve performance.
  3. Ease of expansion: in the distributed database can be easily extended by a horizontal overall system performance is improved, but also through the vertical extensions to provide performance, extended without modifying the system program.
  4. Autonomy: the data on each node by the local DBMS management, automatic processing capability, to complete the application or topical application of this site.

2. MySQL Cluster principle

    MySQL MySQL Cluster is suitable for distributed computing environments highly available, high redundancy version. It uses the NDB Cluster storage engine, it allows centralized in a group to run multiple MySQL servers. In the binary version of MySQL 5.0 and above, and in compatible with the latest version of the Linux RPM package provides the storage engine.

    MySQL Cluster is a technology that allows the deployment of "memory" and "disk" Cluster database in a shared-nothing system. By the shared-nothing architecture, the system can use inexpensive hardware, and no special requirements on hardware. In addition, because each component has its own memory and disk, there is no single point of failure. MySQL Cluster is composed of a group of computers, each computer runs on a variety of processes including MySQL servers, NDB Cluster data nodes, management servers, and dedicated data access program (possible).

Management server (MGM node) manages the Cluster configuration files, and Cluster log. Each node in the Cluster configuration data retrieved from the management server.

When a new event occurs within the data nodes, the nodes transfer information about these events to the management server, then this type of information is written Cluster log.

Currently operating system to run MySQL Cluster are Linux, Mac OS X and Solaris, the latest version has support for the Windows operating system.

MySQL data communication between the nodes of the cluster is not encrypted, and requires high-speed bandwidth, it is proposed to establish a cluster in a high-speed LAN, not recommended for inter-network segment, across the public network to deploy this system architecture.

 

MySQL Cluster is divided into three nodes: the management node, data node and SQL node.

Management node: mainly used to manage each node, a node can be restarted on command, shut down, start the operation. It is possible to monitor the working status of all nodes.

Data node: mainly the storage of data and does not provide other services.

SQL node: The main function is to provide external SQL, similar to an ordinary MySQL Server.

The SQL nodes and data nodes can be the same machine, that machine that is the SQL node is a data node. They just divided on logic, actual deployment, even all of the stages can be located on the same physical machine, but the more complicated configuration.

 

3. MySQL Cluster advantages and disadvantages

advantage:

  1. 99.999% availability
  2. Fast automatic failover
  3. Flexible distributed architecture with no single point of failure
  4. High throughput and low latency
  5. Scalability, support for online capacity expansion

Disadvantages:

  1. There are many limitations, such as: foreign keys are not supported, the data line can not exceed 8K (not included in the text data and BLOB)
  2. Deploy, manage, configure very complex
  3. Occupy large disk space, large memory
  4. Backup and recovery is not convenient
  5. Restart when the data node will load data into memory takes a long time

Guess you like

Origin www.cnblogs.com/guipeng/p/11876729.html