MySQL Cluster is a technology which added shared-nothing clustering capabilities to the MySQL database management system, starting with the production release of MySQL 4.1 in November 2004. The architecture is designed to allow for very high availability and also to provide high performance, while allowing for near linear scalability. 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 safely 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.
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.
Also of note, The current maximum number of metadata objects is limited to 1,600. (including database tables, system tables, indexes, etc.)
Other limitations are listed in the MySQL Manual
Alternatives
Alternatives to provide high availability to MySQL:
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.