MySQL Cluster--01

Source: Internet
Author: User
Tags types of tables

"MySQL Cluster"

MySQL Cluster is an official MySQL cluster deployment solution that supports automatic sharding, read-write extensions, and backup of redundant data in real time. A high-utility, high-redundancy version for distributed computing environments, the highest availability scenario, officially claiming to be 99.999% usable. MySQL Cluster uses NDB Cluster storage engine, including MySQL server, NDB Cluster data node, Management Server, and (possibly) specialized data access program.

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

In fact, the MySQL cluster integrates the NDB memory cluster storage engine with the standard MySQL server. It contains 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.

MySQL cluster configuration, consisting of 3 different functions of the service, each service is provided by a dedicated daemon, a service is also called a node, the following describes the function of each node:

One, management (MGM) node

The MGM node serves to manage other nodes within the MySQL cluster, such as providing configuration data, starting and stopping nodes, running backups, and so on. Because such nodes are responsible for managing the configuration of other nodes, they should be started first before other nodes are started. In theory generally only start one, and the outage does not affect cluster services, this process only in cluster startup and node join the cluster when the role, so this node is not very redundant, in theory, a server to provide services.
The Management Server (MGM node) is responsible for managing cluster profiles 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 a new event occurs within the data node, the node transmits information about such events to the Management Server, and then writes such information to the cluster log.

second, data node

The data used to hold the cluster. The number of data nodes is related to the number of copies, which is a multiple of the fragment, dividing the total number of nodes by Noofreplicas. For example, for two replicas, each copy has two fragments, then there are 4 data nodes, usually set to two copies, more than two can realize the high availability of the cluster, when the data node increases, the processing speed of the cluster will be slow.

Third, SQL node

The node used to access the cluster data. For MySQL Cluster, the client node is a traditional MySQL server using the NDB Cluster storage engine. There can be more than one SQL node in cluster, and the data queried by each SQL node is consistent, usually the more SQL nodes, the smaller the load allocated to each SQL node, the better the overall performance of the system.

All of these nodes form a complete MySQL cluster: The data is stored in the storage engine of the NDB storage server, and the table (structure) is stored in the MySQL server. The application accesses these data tables through the MySQL server, and the cluster Management Server manages the NDB storage server through the Administrative Tools (NDB_MGMD).
By introducing MySQL Cluster into the open-source world, MySQL provides highly available, high-performance, and scalable Cluster data management for everyone who needs it.

"NDB Storage Engine"

MySQL Cluster uses a dedicated memory-based storage engine NDB, which has the advantage of fast, no disk I/O bottlenecks, but because of the memory-based, so the size of the database is limited by the total system memory, such as running NDB MySQL server must be large enough memory, such as 4G, 8G, or even 16G. NDB engine is distributed, it can be configured on multiple servers to achieve the reliability and scalability of data, in theory, through the configuration of 2 NDB storage node can realize the redundancy of the entire database cluster and solve single point of failure problem.

There are two types of tables that can be created on NDB:
1. Memory table: All data (including index) is in memory. It also saves data on disk, so you don't have to worry about data loss, Datanode will load the data into memory at startup.
2, Disk table: Only the primary key, the index field is saved in memory, the other fields are saved in the disk file.

MySQL Cluster Features

    1. High level of write extensibility through automatic sharding: MySQL Cluster automatically partitions (or partitioning) tables onto different nodes, allowing the database to scale horizontally on low-cost commodity hardware while maintaining full application transparency to the application.
    2. 99.999% availability: With its distributed, non-shared architecture, MySQL Cluster provides 99.999% availability, ensuring strong resiliency and the ability to perform scheduled maintenance without downtime.
    3. SQL and NoSQL api:mysql Cluster enable users to consolidate the best parts of relational database technology and NOSQL technologies in their solutions, reducing 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 cross-geo-replication capabilities: cross-geo replication enables multiple clusters to be distributed across different locations, increasing disaster resilience and global WEB services scalability.
    6. Online extensions and Schema upgrades: to support continuous operation, MySQL Cluster allows for the addition of nodes and updates to the running database schema, enabling fast-changing and highly dynamic workloads.

Disadvantages

    1. Based on memory, the size of the database is limited by the total amount of memory in the cluster
    2. Multiple nodes through the network to achieve communication and data synchronization, query and other operations, so the whole is affected by the speed of the network

MySQL Cluster--01

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.