FAQs about MySQL Cluster

Source: Internet
Author: User

MySQL cluster is a highly practical and redundant MySQL version suitable for distributed computing environments. It uses the NDB Cluster Storage engine and allows multiple MySQL servers to run in one cluster.

MySQL cluster is a technology that allows you to deploy the "in memory" Database Cluster in a non-shared system. Without a shared architecture, the system can use cheap hardware without special requirements for hardware and software. In addition, since each component has its own memory and disk, there is no single point of failure.

Summarizes some common problems to be aware of when porting data to a MySQL cluster.

About connection

MySQL clusters are suitable for high-speed bandwidth environments and are connected using TCP/IP. Its performance is directly related to the connection rate between hosts. The minimum rate in a cluster must be MB Ethernet or equivalent. We recommend that you use a g-level network if possible.

About memory

MySQL clusters can run on any NDB-enabled platform. Obviously, the faster the CPU, the larger the memory, the more obvious the cluster performance improvement, the 64-bit CPU may be faster than the 32-bit processor. Each machine that acts as a data node must have enough memory to store the shared database.

In MySQL 5.0, clusters can only be based on memory. This means that the data (including indexes) of all tables are stored in the memory. If your data is as big as 1 GB and you want to copy a copy to the cluster, you need 2 GB of memory (1 GB for each copy ), this is the memory required by the computer running the cluster over other operating systems.

If the memory usage on a data node exceeds the available range, the operating system will use
Swap memory to reach the upper limit datamemory. However, this will cause serious performance degradation and may lead to slow down the corresponding time. It is for this reason that we do not recommend using disk transfer in the production environment.
Change the space. Under any circumstances, as long as the datamemory ceiling is reached, all operation requests (such as insertion) will fail.

A disk-based cluster is implemented in MySQL 5.1, but this function is not available in MySQL 5.0. The index fields that contain the primary key hash index must still be saved in Ram, but all other fields can be saved on the disk.

Note:
Each MySQL cluster Table requires a primary key. If no primary key is defined, NDB
The storage engine automatically creates a data node with the same memory size, because no data node in the cluster can use more memory than other data nodes. In other words, if the cluster has
For four computers, if three computers have 3 GB of memory and the other is only 1 GB, each data node can only use 1 GB of memory for the cluster.

About Security

The communication between the two nodes in the MySQL cluster is insecure; they are not encrypted or protected by any protection mechanism. A secure cluster is placed in a private network within the firewall, and data and Management Nodes cannot be directly accessed in the external world (SQL nodes should also be protected like other MySQL servers ).

About storage engines

MySQL clusters only support the NDB storage engine. To share a table in a cluster node, you must specify engine = NDB (or engine = ndbcluster ).

MySQL clusters can also use MyISAM or InnoDB Storage engine to create data tables. However, non-NDB tables are not stored and shared among cluster nodes. They are independent of the created MySQL server or instance.

About Import

You can import Mysql Data of various versions to the cluster. The only requirement is that the table to be imported must be the NDB storage engine, that is, the table created using engine = NDB or engine = ndbcluster.

About Data Types

MySQL clusters support all common data types, except mysql-related spatial extension types (for details, see Chapter 16 and spatial extensions ). In addition, NDB table indexes are also somewhat different.

Note: MySQL cluster Table (NDB or ndbcluster)
Only fixed-length records are supported. This also means (for example) If a record contains varchar (255)
Field, it requires 255 characters of space (as large as the character set used in the data table and the space required for verification), regardless of the number of characters actually stored. But in MySQL
In 5.1, only the field portion occupied by the record is saved.

In the NDB table, the database name, table name, and attribute name cannot be used with other table handlers.
. The attribute name will be truncated to 31 characters. If it is not unique after the truncation, it will cause an error. The total length of the Database Name and table name is 122 characters (that is, the NDB cluster Table Name
The maximum length is 122 characters minus the number of characters in the name of the database to which the table belongs ).

About transactions

All tables in the NDB storage engine support transactions. In MySQL 5.0, clusters only support Read committed isolation.

About Foreign keys

The NDB storage engine does not support foreign keys. Like MyISAM, they are not supported.

Fulltext Index

In MySQL 5.0, The NDB storage engine does not support Fulltext indexes, and does not support Fulltext indexes except the MyISAM storage engine.

Related Article

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.