MySQL Cluster

This is an old revision of this page, as edited by 69.202.214.21 (talk) at 22:10, 23 November 2004 (Shared Nothing). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

MySQL Cluster is a technology that adds shared-nothing clustering capabilities to MySQL. The architecture is designed to allow for very high availability and also to provide high performance, while allowing for near linear scalibility. MySQL Cluster is implemented through an additional storage engine available within MySQL called NDB.

Architecture

MySQL Cluster has a few important concepts behind its design, which give both benefits and disadvantages.

Replication

NDB uses synchronous replication through a two-phase commit mechanism in order to guarentee that data is written to multiple nodes upon commiting the data. Normally there is two copies of the data in the cluster, however it can be configured to allow 1-4 copies at any single time.

Horizontal Data Partitioning

Data within NDB tables are automatically partitioned across all of the data nodes in the system. This is done based on a hashing algorithm based on the PRIMARY KEY on the table. This is totally transparent to the end application.

In-memory Storage

NDB currently stores all data and indexes in memory. NDB only writes the data to disk asynchronously. The reason it can do this safetly is due to the first point above, replication.

Shared Nothing

NDB has no single point of failure by design. Assuming a normal setup, any single node, system, or piece of hardware can fail without the entire cluster failing.

Implementation

NDB has three different types of nodes that are involved in a cluster setup.

Data node (ndbd)

These nodes are the ones that actually involved in storing the data in the MySQL Cluster setup.

Management node (ndb_mgmd)

Management nodes are used for configuration and monitoring of the cluster. They are only required during node startup.

Client node (mysqld)

mysqld acts as a client node connecting to all of the data nodes in order to doing data storage and retrieval.

Limitations

The largest limitation currently is with the fact that it is an in-memory database. This means that across the cluster setup, you need enough RAM to store the entire dataset. Other limitations are listed in the MySQL Manual

Another limitation is with how many nodes can be part of the cluster. Currently you can only have up to 64 nodes in the cluster with up to 48 of those being data nodes that store the actual data. It is possible to change this at compile time, but that has not been throughly tested at this point.

History

MySQL AB acquired the technology behind MySQL Cluster from Alzato, a small venture company started by Ericsson. NDB was originally designed for the telecom market, with its high availabity and high performance requirements. The original press release is still available from MySQL AB

It has since been integrated into the MySQL product, with its first release being in MySQL 4.1.

Cluster Product Overview

MySQL Cluster Documentation