Author: jstephens
Date: 2010-10-18 15:51:57 +0200 (Mon, 18 Oct 2010)
New Revision: 23183
Log:
De-gunking and general revisions
Modified:
trunk/refman-5.1/mysql-cluster-overview.xml
Modified: trunk/refman-5.1/mysql-cluster-overview.xml
===================================================================
--- trunk/refman-5.1/mysql-cluster-overview.xml 2010-10-18 13:44:41 UTC (rev 23182)
+++ trunk/refman-5.1/mysql-cluster-overview.xml 2010-10-18 13:51:57 UTC (rev 23183)
Changed blocks: 13, Lines Added: 257, Lines Deleted: 262; 25738 bytes
@@ -256,14 +256,14 @@
<listitem>
<para>
- <firstterm>Management node</firstterm> (MGM node): The role of
- this type of node is to manage the other nodes within the
- MySQL Cluster, performing such functions 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. An MGM node is
- started with the command <command>ndb_mgmd</command>.
+ <firstterm>Management node</firstterm>: The role of this type
+ of node is to manage the other nodes within the MySQL Cluster,
+ performing such functions 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. An MGM node is started with the command
+ <command>ndb_mgmd</command>.
</para>
</listitem>
@@ -314,11 +314,12 @@
<para>
An SQL node is actually just a specialized type of
<firstterm>API node</firstterm>, which designates any
- application which accesses Cluster data. Another example of an
- API node is the <command>ndb_restore</command> utility that is
- used to restore a cluster backup. It is possible to write such
- applications using the NDB API. For basic information about
- the NDB API, see <xref linkend="ndb-getting-started"/>.
+ application which accesses MySQL Cluster data. Another example
+ of an API node is the <command>ndb_restore</command> utility
+ that is used to restore a cluster backup. It is possible to
+ write such applications using the NDB API. For basic
+ information about the NDB API, see
+ <xref linkend="ndb-getting-started"/>.
</para>
</listitem>
@@ -351,8 +352,8 @@
</para>
<para>
- The management server (MGM node) manages the cluster configuration
- file and the cluster log. Each node in the cluster retrieves the
+ 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
@@ -362,85 +363,108 @@
<para>
In addition, there can be any number of cluster client processes
- or applications. These are of two types:
+ or applications. These include standard MySQL clients,
+ <literal>NDB</literal>-specific API programs, and management
+ clients. These are described in the next few paragraphs.
</para>
- <itemizedlist>
+ <formalpara>
- <listitem>
- <formalpara>
+ <title>Standard MySQL clients</title>
- <title>Standard MySQL clients</title>
+ <para>
+ MySQL 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 MySQL Cluster SQL nodes
+ in much the same way that they interact with standalone MySQL
+ servers.
+ </para>
- <para>
- MySQL 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 MySQL Cluster SQL
- nodes in much the same way that they interact with
- standalone MySQL servers.
- </para>
+ </formalpara>
- </formalpara>
+ <indexterm>
+ <primary>failover</primary>
+ <secondary>Java clients</secondary>
+ </indexterm>
- <indexterm>
- <primary>failover</primary>
- <secondary>Java clients</secondary>
- </indexterm>
+ <indexterm>
+ <primary>MySQL Cluster</primary>
+ <secondary>Java clients</secondary>
+ </indexterm>
- <indexterm>
- <primary>MySQL Cluster</primary>
- <secondary>Java clients</secondary>
- </indexterm>
+ <indexterm>
+ <primary>jdbc:mysql:loadbalance://</primary>
+ </indexterm>
- <indexterm>
- <primary>jdbc:mysql:loadbalance://</primary>
- </indexterm>
+ <para>
+ MySQL clients using a MySQL 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
+ <literal>jdbc:mysql:loadbalance://</literal> URLs (improved in
+ Connector/J 5.1.7) to achieve load balancing transparently; for
+ more information about using Connector/J with MySQL Cluster, see
+ <xref linkend="mccj-using-connectorj"/>.
+ </para>
- <para>
- MySQL clients using a MySQL 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 <literal>jdbc:mysql:loadbalance://</literal> URLs
- (improved in Connector/J 5.1.7) to achieve load balancing
- transparently
+ <formalpara>
-<!--
- ; for more information about using Connector/J
- with MySQL Cluster, see
- <xref linkend="mccj-using-connectorj"/>
--->
+ <title><literal>NDB</literal> client programs</title>
- .
- </para>
- </listitem>
+ <para>
+ Client programs can be written that access MySQL Cluster data
+ directly from the <literal>NDBCLUSTER</literal> storage engine,
+ bypassing any MySQL Servers that may connected to the cluster,
+ using the <firstterm>NDB API</firstterm>, 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 <xref linkend="ndbapi"/>.
+ </para>
- <listitem>
- <formalpara>
+ </formalpara>
- <title>Management clients</title>
+ <para>
+ Beginning with MySQL Cluster NDB 7.1,
+ <literal>NDB</literal>-specific Java applications can also be
+ written for MySQL Cluster, using the <firstterm>MySQL Cluster
+ Connector for Java</firstterm>. This MySQL Cluster Connector
+ includes <firstterm>ClusterJ</firstterm>, a high-level database
+ API similar to object-relational mapping persistence frameworks
+ such as Hibernate and JPA that connect directly to
+ <literal>NDBCLUSTER</literal>, and so does not require access to a
+ MySQL Server. Support is also provided in MySQL Cluster NDB 7.1
+ and later for <firstterm>ClusterJPA</firstterm>, an OpenJPA
+ implementation for MySQL 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
+ <xref linkend="mccj-overview-java"/>, and
+ <xref linkend="mccj-overview-clusterj-object-models"/>, for more
+ information.
+ </para>
- <para>
- 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. Such clients—such as the
- <command>ndb_mgm</command> management client supplied with
- MySQL Cluster (see
- <xref linkend="mysql-cluster-programs-ndb-mgm"/>)—are
- written using the MGM API, a C-language API that
- communicates directly with one or more MySQL Cluster
- management servers. For more information, see
- <xref linkend="mgm-api"/>.
- </para>
+ <formalpara>
- </formalpara>
- </listitem>
+ <title>Management clients</title>
- </itemizedlist>
+ <para>
+ 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
+ <command>ndb_mgm</command> management client supplied with MySQL
+ Cluster (see <xref linkend="mysql-cluster-programs-ndb-mgm"/>).
+ Such applications can be written using the <firstterm>MGM
+ API</firstterm>, a C-language API that communicates directly
+ with one or more MySQL Cluster management servers. For more
+ information, see <xref linkend="mgm-api"/>.
+ </para>
+ </formalpara>
+
<formalpara>
<title>Event logs</title>
@@ -450,7 +474,7 @@
errors, checkpoints, and so on), priority, and severity. A
complete listing of all reportable events may be found in
<xref linkend="mysql-cluster-event-reports"/>. Event logs are of
- two types:
+ the two types listed here:
</para>
</formalpara>
@@ -458,28 +482,17 @@
<itemizedlist>
<listitem>
- <formalpara>
-
- <title>Cluster log</title>
-
- <para>
- Keeps a record of all desired reportable events for the
- cluster as a whole.
- </para>
-
- </formalpara>
+ <para>
+ <firstterm>Cluster log</firstterm>: Keeps a record of all
+ desired reportable events for the cluster as a whole.
+ </para>
</listitem>
<listitem>
- <formalpara>
-
- <title>Node log</title>
-
- <para>
- A separate log which is also kept for each individual node.
- </para>
-
- </formalpara>
+ <para>
+ <firstterm>Node log</firstterm>: A separate log which is also
+ kept for each individual node.
+ </para>
</listitem>
</itemizedlist>
@@ -499,12 +512,13 @@
<para>
Generally speaking, when data is saved to disk, it is said that
- a checkpoint has been reached. More specific to Cluster, it is a
- point in time where all committed transactions are stored on
- disk. With regard to the <literal role="se">NDB</literal>
- storage engine, there are two types of checkpoints which work
- together to ensure that a consistent view of the cluster's data
- is maintained:
+ a <firstterm>checkpoint</firstterm> has been reached. More
+ specific to MySQL Cluster, a checkpoint is a point in time where
+ all committed transactions are stored on disk. With regard to
+ the <literal role="se">NDB</literal> storage engine, there are
+ two types of checkpoints which work together to ensure that a
+ consistent view of the cluster's data is maintained. These are
+ shown in the following list:
</para>
</formalpara>
@@ -512,34 +526,23 @@
<itemizedlist>
<listitem>
- <formalpara>
-
- <title>Local Checkpoint (LCP)</title>
-
- <para>
- This is a checkpoint that is specific to a single node;
- however, LCP's take place for all nodes in the cluster more
- or less concurrently. An LCP involves saving all of a node's
- data to disk, and so usually occurs every few minutes. The
- precise interval varies, and depends upon the amount of data
- stored by the node, the level of cluster activity, and other
- factors.
- </para>
-
- </formalpara>
+ <para>
+ <firstterm>Local Checkpoint (LCP)</firstterm>: This is a
+ checkpoint that is specific to a single node; however, LCP's
+ take place for all nodes in the cluster more or less
+ concurrently. An LCP involves saving all of a node's data to
+ disk, and so usually occurs every few minutes. The precise
+ interval varies, and depends upon the amount of data stored by
+ the node, the level of cluster activity, and other factors.
+ </para>
</listitem>
<listitem>
- <formalpara>
-
- <title>Global Checkpoint (GCP)</title>
-
- <para>
- A GCP occurs every few seconds, when transactions for all
- nodes are synchronized and the redo-log is flushed to disk.
- </para>
-
- </formalpara>
+ <para>
+ <firstterm>Global Checkpoint (GCP)</firstterm>: A GCP occurs
+ every few seconds, when transactions for all nodes are
+ synchronized and the redo-log is flushed to disk.
+ </para>
</listitem>
</itemizedlist>
@@ -592,173 +595,159 @@
</para>
<para>
- Central to an understanding of this topic are the following
- concepts, listed here with brief definitions:
+ A number of concepts central to an understanding of this topic are
+ discussed in the next few paragraphs.
</para>
- <itemizedlist>
+ <formalpara>
- <listitem>
- <formalpara>
+ <title>(Data) Node</title>
- <title>(Data) Node</title>
+ <para>
+ An <command>ndbd</command> process, which stores a
+ <firstterm>replica</firstterm> —that is, a copy of the
+ <firstterm>partition</firstterm> (see below) assigned to the
+ node group of which the node is a member.
+ </para>
- <para>
- An <command>ndbd</command> process, which stores a
- <firstterm>replica</firstterm> —that is, a copy of the
- <firstterm>partition</firstterm> (see below) assigned to the
- node group of which the node is a member.
- </para>
+ </formalpara>
- </formalpara>
+ <para>
+ Each data node should be located on a separate computer. While it
+ is also possible to host multiple <command>ndbd</command>
+ processes on a single computer, such a configuration is not
+ supported.
+ </para>
- <para>
- Each data node should be located on a separate computer. While
- it is also possible to host multiple <command>ndbd</command>
- processes on a single computer, such a configuration is not
- supported.
- </para>
+ <para>
+ It is common for the terms <quote>node</quote> and <quote>data
+ node</quote> to be used interchangeably when referring to an
+ <command>ndbd</command> process; where mentioned, management (MGM)
+ nodes (<command>ndb_mgmd</command> processes) and SQL nodes
+ (<command>mysqld</command> processes) are specified as such in
+ this discussion.
+ </para>
- <para>
- It is common for the terms <quote>node</quote> and <quote>data
- node</quote> to be used interchangeably when referring to an
- <command>ndbd</command> process; where mentioned, management
- (MGM) nodes (<command>ndb_mgmd</command> processes) and SQL
- nodes (<command>mysqld</command> processes) are specified as
- such in this discussion.
- </para>
- </listitem>
+ <formalpara>
- <listitem>
- <formalpara>
+ <title>Node Group</title>
- <title>Node Group</title>
+ <para>
+ A node group consists of one or more nodes, and stores
+ partitions, or sets of <firstterm>replicas</firstterm> (see next
+ item).
+ </para>
- <para>
- A node group consists of one or more nodes, and stores
- partitions, or sets of <firstterm>replicas</firstterm> (see
- next item).
- </para>
+ </formalpara>
- </formalpara>
+ <para>
+ The number of node groups in a MySQL Cluster is not directly
+ configurable; it is function of the number of data nodes and of
+ the number of replicas (<literal>NumberOfReplicas</literal>
+ configuration parameter), as shown here:
+ </para>
- <para>
- The number of node groups in a MySQL Cluster is not directly
- configurable; it is function of the number of data nodes and
- of the number of replicas (<literal>NumberOfReplicas</literal>
- configuration parameter), as shown here:
- </para>
-
<programlisting>
[<replaceable>number_of_node_groups</replaceable>] = <replaceable>number_of_data_nodes</replaceable> / <literal>NumberOfReplicas</literal>
</programlisting>
- <para>
- Thus, a MySQL Cluster with 4 data nodes has 4 node groups if
- <literal>NumberOfReplicas</literal> is set to 1 in the
- <filename>config.ini</filename> file, 2 node groups if
- <literal>NumberOfReplicas</literal> is set to 2, and 1 node
- group if <literal>NumberOfReplicas</literal> is set to 4.
- Replicas are discussed later in this section; for more
- information about <literal>NumberOfReplicas</literal>, see
- <xref linkend="mysql-cluster-ndbd-definition"/>.
- </para>
+ <para>
+ Thus, a MySQL Cluster with 4 data nodes has 4 node groups if
+ <literal>NumberOfReplicas</literal> is set to 1 in the
+ <filename>config.ini</filename> file, 2 node groups if
+ <literal>NumberOfReplicas</literal> is set to 2, and 1 node group
+ if <literal>NumberOfReplicas</literal> is set to 4. Replicas are
+ discussed later in this section; for more information about
+ <literal>NumberOfReplicas</literal>, see
+ <xref linkend="mysql-cluster-ndbd-definition"/>.
+ </para>
- <note>
- <para>
- All node groups in a MySQL Cluster must have the same number
- of data nodes.
- </para>
- </note>
+ <note>
+ <para>
+ All node groups in a MySQL Cluster must have the same number of
+ data nodes.
+ </para>
+ </note>
- <para>
- Prior to MySQL Cluster NDB 7.0, it was not possible to add new
- data nodes to a MySQL Cluster without shutting down the
- cluster completely and reloading all of its data. In MySQL
- Cluster NDB 7.0 (beginning with MySQL Cluster version NDB
- 6.4.0), you can add new node groups (and thus new data nodes)
- to a running MySQL Cluster—see
- <xref linkend="mysql-cluster-online-add-node"/>, for
- information about how this can be done.
- </para>
- </listitem>
+ <para>
+ Prior to MySQL Cluster NDB 7.0, it was not possible to add new
+ data nodes to a MySQL Cluster without shutting down the cluster
+ completely and reloading all of its data. In MySQL Cluster NDB 7.0
+ (beginning with MySQL Cluster version NDB 6.4.0), you can add new
+ node groups (and thus new data nodes) to a running MySQL
+ Cluster—see <xref linkend="mysql-cluster-online-add-node"/>,
+ for information about how this can be done.
+ </para>
- <listitem>
- <formalpara>
+ <formalpara>
- <title>Partition</title>
+ <title>Partition</title>
- <para>
- This is a portion of the data stored by the cluster. There
- are as many cluster partitions as nodes participating in the
- cluster. Each node is responsible for keeping at least one
- copy of any partitions assigned to it (that is, at least one
- replica) available to the cluster.
- </para>
+ <para>
+ This is a portion of the data stored by the cluster. There are
+ as many cluster partitions as nodes participating in the
+ cluster. Each node is responsible for keeping at least one copy
+ of any partitions assigned to it (that is, at least one replica)
+ available to the cluster.
+ </para>
- </formalpara>
+ </formalpara>
- <para>
- A replica belongs entirely to a single node; a node can (and
- usually does) store several replicas.
- </para>
+ <para>
+ A replica belongs entirely to a single node; a node can (and
+ usually does) store several replicas.
+ </para>
- <para>
- MySQL Cluster normally partitions
- <literal role="se">NDBCLUSTER</literal> tables automatically.
- However, in MySQL 5.1 and later MySQL Cluster releases, it is
- possible to employ user-defined partitioning with
- <literal role="se">NDBCLUSTER</literal> tables. This is
- subject to the following limitations:
- </para>
+ <para>
+ MySQL Cluster normally partitions
+ <literal role="se">NDBCLUSTER</literal> tables automatically.
+ However, in MySQL 5.1 and later MySQL Cluster releases, it is
+ possible to employ user-defined partitioning with
+ <literal role="se">NDBCLUSTER</literal> tables. This is subject to
+ the following limitations:
+ </para>
- <orderedlist>
+ <orderedlist>
- <listitem>
- <para>
- Only <literal>KEY</literal> and <literal>LINEAR
- KEY</literal> partitioning schemes can be used with
- <literal role="se">NDBCLUSTER</literal> tables.
- </para>
- </listitem>
-
- <listitem>
- <para>
- The maximum number of partitions that may be definied
- explicitly for any <literal role="se">NDBCLUSTER</literal>
- table is 8 per node group. (The number of node groups in a
- MySQL Cluster is determined as discussed previously in
- this section.)
- </para>
- </listitem>
-
- </orderedlist>
-
+ <listitem>
<para>
- For more information relating to MySQL Cluster and
- user-defined partitioning, see
- <xref linkend="mysql-cluster-limitations"/>, and
- <xref linkend="partitioning-limitations-storage-engines"/>.
+ Only <literal>KEY</literal> and <literal>LINEAR KEY</literal>
+ partitioning schemes can be used with
+ <literal role="se">NDBCLUSTER</literal> tables.
</para>
</listitem>
<listitem>
- <formalpara>
+ <para>
+ The maximum number of partitions that may be definied
+ explicitly for any <literal role="se">NDBCLUSTER</literal>
+ table is 8 per node group. (The number of node groups in a
+ MySQL Cluster is determined as discussed previously in this
+ section.)
+ </para>
+ </listitem>
- <title>Replica</title>
+ </orderedlist>
- <para>
- This is a copy of a cluster partition. Each node in a node
- group stores a replica. Also sometimes known as a
- <firstterm>partition replica</firstterm>. The number of
- replicas is equal to the number of nodes per node group.
- </para>
+ <para>
+ For more information relating to MySQL Cluster and user-defined
+ partitioning, see <xref linkend="mysql-cluster-limitations"/>, and
+ <xref linkend="partitioning-limitations-storage-engines"/>.
+ </para>
- </formalpara>
- </listitem>
+ <formalpara>
- </itemizedlist>
+ <title>Replica</title>
+ <para>
+ This is a copy of a cluster partition. Each node in a node group
+ stores a replica. Also sometimes known as a <firstterm>partition
+ replica</firstterm>. The number of replicas is equal to the
+ number of nodes per node group.
+ </para>
+
+ </formalpara>
+
<para>
The following diagram illustrates a MySQL Cluster with four data
nodes, arranged in two node groups of two nodes each; nodes 1 and
@@ -784,7 +773,7 @@
The data stored by the cluster is divided into four partitions,
numbered 0, 1, 2, and 3. Each partition is stored—in
multiple copies—on the same node group. Partitions are
- stored on alternate node groups:
+ stored on alternate node groups as follows:
</para>
<itemizedlist>
@@ -893,9 +882,9 @@
sufficient. The MySQL software requirements are simple: all that
is needed is a production release of MySQL
&mysql-cluster-current-7.0; or &mysql-cluster-current-7.1; to have
- MySQL Cluster support. It is not necessary to compile MySQL
- yourself merely to be able to use MySQL Cluster. We assume that
- you are using the server binary appropriate to your platform,
+ MySQL Cluster support. It is not strictly necessary to compile
+ MySQL yourself merely to be able to use MySQL Cluster. We assume
+ that you are using the binaries appropriate to your platform,
available from the MySQL Cluster software downloads page at
<ulink url="&base-url-cluster-downloads;"/>.
</para>
@@ -4351,7 +4340,7 @@
<listitem>
<para>
- Cluster
+ MySQL Cluster
</para>
</listitem>
@@ -4373,6 +4362,12 @@
</para>
</listitem>
+ <listitem>
+ <para>
+ ClusterJ
+ </para>
+ </listitem>
+
</itemizedlist>
<para>
| Thread |
|---|
| • svn commit - mysqldoc@docsrva: r23183 - trunk/refman-5.1 | jon.stephens | 18 Oct |