DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

(mysql.info.gz) MySQL Cluster Basics

Info Catalog (mysql.info.gz) MySQL Cluster Overview (mysql.info.gz) NDBCluster (mysql.info.gz) MySQL Cluster Configuration
 
 16.2 Basic MySQL Cluster Concepts
 =================================
 
 `NDB' is an in-memory storage engine offering high-availability and
 data-persistence features.
 
 The `NDB' storage engine can be configured with a range of failover and
 load-balancing options, but it is easiest to start with the storage
 engine at the cluster level. MySQL Cluster's `NDB' storage engine
 contains a complete set of data, dependent only on other data within
 the cluster itself.
 
 We will describe how to set up a MySQL Cluster consisting of an `NDB'
 storage engine and some MySQL servers.
 
 The cluster portion of MySQL Cluster is currently configured
 independently of the MySQL servers. In a MySQL Cluster, each part of
 the cluster is considered to be a `node'.
 
 * A node is in many contexts a computer, but for MySQL Cluster it
 is a process. There can be any number of nodes on a single computer.
 
 Each node has a type, and there can be multiple nodes of each type in a
 MySQL Cluster. In a minimal MySQL Cluster configuration, there will be
 at least three nodes:
 
    * The management (`MGM') node: The role of this type of node is to
      manage the other nodes within the MySQL Cluster, such as providing
      configuration data, starting and stopping nodes, running backup,
      and so forth.  Because this node type manages the configuration of
      the other nodes, a node of this type should be started first,
      before any other node. With a running cluster, the MGM node does
      not necessarily have to be running all the time. A MGM node is
      started with the command `ndb_mgmd'; for this reason NDB_MGMD is
      provided as an alias for MGM when configuring the cluster.
 
    * The storage or database (`DB') node: This is the type of node that
      manages and stores the database itself. There are as many DB nodes
      as you have replicas times the number of fragments. For example,
      with two replicas, each having two fragments, you will need four
      DB nodes.  It is not necessary to have more than one replica, so a
      minimal MySQL Cluster may contain just one DB node. A DB node is
      started with the command `ndbd', and so NDBD is provided as an
      alias for DB when configuring the cluster.
 
    * The client (`API') node: This is the client node that will access
      the cluster. In the case of MySQL Cluster, a client node is a
      traditional MySQL server that uses the `NDB Cluster' storage
      engine, enabling access to clustered tables. Basically, the MySQL
      server acts as a client of the NDB cluster. Applications using the
      NDB API directly are also considered API nodes. Since a MySQL
      server is typically started with the command `mysqld' or
      `mysqld_safe', MYSQLD is provided as an alias for API when
      configuring the cluster.
 
 Cluster processes are also referred to as cluster nodes. Configuration
 of the cluster involves configuring each individual node in the cluster
 and setting up individual communication links between nodes. MySQL
 Cluster is currently designed with the intention that storage nodes are
 homogeneous in terms of processor power, memory space, and
 communication bandwidth. In addition, in order 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
 storage 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 clients to the cluster. These
 are of two types.
 
    * *Standard MySQL clients*: These are no different for MySQL Cluster
      than they are for standard (non-Cluster) MySQL. In other words,
      MySQL Cluster can be accessed from existing MySQL applications
      written in PHP, Perl, C, C++, Java, Python, Ruby, and so on.
 
    * *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.
 
 
Info Catalog (mysql.info.gz) MySQL Cluster Overview (mysql.info.gz) NDBCluster (mysql.info.gz) MySQL Cluster Configuration
automatically generated byinfo2html