16.4.4.8. MySQL Cluster TCP/IP Connections Using Direct Connections
Setting up a cluster using direct connections between data
nodes requires specifying explicitly the crossover IP
addresses of the data nodes so connected in the
[TCP]
section of the cluster
config.ini
file.
In the following example, we envision a cluster with at least
four hosts, one each for a management server, an SQL node, and
two data nodes. The cluster as a whole resides on the
172.23.72.*
subnet of a LAN. In addition to
the usual network connections, the two data nodes are
connected directly using a standard crossover cable, and
communicate with one another directly using IP addresses in
the 1.1.0.*
address range as shown:
# Management Server
[NDB_MGMD]
Id=1
HostName=172.23.72.20
# SQL Node
[MYSQLD]
Id=2
HostName=172.23.72.21
# Data Nodes
[NDBD]
Id=3
HostName=172.23.72.22
[NDBD]
Id=4
HostName=172.23.72.23
# TCP/IP Connections
[TCP]
NodeId1=3
NodeId2=4
HostName1=1.1.0.1
HostName2=1.1.0.2
The use of direct connections between data nodes can improve
the cluster's overall efficiency by allowing the data nodes to
bypass an Ethernet device such as a switch, hub, or router,
thus cutting down on the cluster's latency. It is important to
note that to take the best advantage of direct connections in
this fashion with more than two data nodes, you must have a
direct connection between each data node and every other data
node in the same node group.