NDB Cluster Core Concepts
that data nodes are homogeneous in terms of processor power, memory space, and bandwidth. In
addition, to provide a single point of configuration, all configuration data for the cluster as a whole is
located in one configuration file.
The management server manages the cluster configuration file and the cluster log. Each node in
the cluster retrieves the configuration data from the management server, and so requires a way to
determine where the management server resides. When interesting events occur in the data nodes,
the nodes transfer information about these events to the management server, which then writes the
information to the cluster log.
In addition, there can be any number of cluster client processes or applications. These include
standard MySQL clients, NDB-specific API programs, and management clients. These are described in
the next few paragraphs.
Standard MySQL clients. NDB Cluster can be used with existing MySQL applications written in
PHP, Perl, C, C++, Java, Python, Ruby, and so on. Such client applications send SQL statements to
and receive responses from MySQL servers acting as NDB Cluster SQL nodes in much the same way
that they interact with standalone MySQL servers.
MySQL clients using an NDB Cluster as a data source can be modified to take advantage of the ability
to connect with multiple MySQL servers to achieve load balancing and failover. For example, Java
clients using Connector/J 5.0.6 and later can use jdbc:mysql:loadbalance:// URLs (improved
in Connector/J 5.1.7) to achieve load balancing transparently; for more information about using
Connector/J with NDB Cluster, see Using Connector/J with NDB Cluster.
NDB client programs. Client programs can be written that access NDB Cluster data directly from
the NDBCLUSTER storage engine, bypassing any MySQL Servers that may be connected to the cluster,
using the NDB API, a high-level C++ API. Such applications may be useful for specialized purposes
where an SQL interface to the data is not needed. For more information, see The NDB API.
NDB-specific Java applications can also be written for NDB Cluster using the NDB Cluster Connector
for Java. This NDB Cluster Connector includes ClusterJ, a high-level database API similar to object-
relational mapping persistence frameworks such as Hibernate and JPA that connect directly to
NDBCLUSTER, and so does not require access to a MySQL Server. Support is also provided in NDB
Cluster for ClusterJPA, an OpenJPA implementation for NDB Cluster that leverages the strengths of
ClusterJ and JDBC; ID lookups and other fast operations are performed using ClusterJ (bypassing the
MySQL Server), while more complex queries that can benefit from MySQL's query optimizer are sent
through the MySQL Server, using JDBC. See Java and NDB Cluster, and The ClusterJ API and Data
Object Model, for more information.
NDB Cluster also supports applications written in JavaScript using Node.js. The MySQL Connector
for JavaScript includes adapters for direct access to the NDB storage engine and as well as for the
MySQL Server. Applications using this Connector are typically event-driven and use a domain object
model similar in many ways to that employed by ClusterJ. For more information, see MySQL NoSQL
Connector for JavaScript.
The Memcache API for NDB Cluster, implemented as the loadable ndbmemcache storage engine
for memcached version 1.6 and later, can be used to provide a persistent NDB Cluster data store,
accessed using the memcache protocol.
The standard memcached caching engine is included in the NDB Cluster 7.5 distribution. Each
memcached server has direct access to data stored in NDB Cluster, but is also able to cache data
locally and to serve (some) requests from this local cache.
For more information, see ndbmemcache—Memcache API for NDB Cluster.
Management clients. These clients connect to the management server and provide commands for
starting and stopping nodes gracefully, starting and stopping message tracing (debug versions only),
showing node versions and status, starting and stopping backups, and so on. An example of this type
of program is the ndb_mgm management client supplied with NDB Cluster (see Section 6.5, “ndb_mgm
10