Documentation Home
MySQL Cluster NDB 6.1-7.1
Download this Excerpt
PDF (US Ltr) - 3.5Mb
PDF (A4) - 3.5Mb
EPUB - 1.3Mb
HTML Download (TGZ) - 1.2Mb
HTML Download (Zip) - 1.2Mb


5.3.9 MySQL Cluster TCP/IP Connections

TCP/IP is the default transport mechanism for all connections between nodes in a MySQL Cluster. Normally it is not necessary to define TCP/IP connections; MySQL Cluster automatically sets up such connections for all data nodes, management nodes, and SQL or API nodes.

To override the default connection parameters, it is necessary to define a connection using one or more [tcp] sections in the config.ini file. Each [tcp] section explicitly defines a TCP/IP connection between two MySQL Cluster nodes, and must contain at a minimum the parameters NodeId1 and NodeId2, as well as any connection parameters to override.

It is also possible to change the default values for these parameters by setting them in the [tcp default] section.

Important

Any [tcp] sections in the config.ini file should be listed last, following all other sections in the file. However, this is not required for a [tcp default] section. This requirement is a known issue with the way in which the config.ini file is read by the MySQL Cluster management server.

Connection parameters which can be set in [tcp] and [tcp default] sections of the config.ini file are listed here:

  • NodeId1

    Effective VersionType/UnitsDefaultRange/ValuesRestart Type
    MySQL 5.1.0numeric[none]...N

    To identify a connection between two nodes it is necessary to provide their node IDs in the [tcp] section of the configuration file as the values of NodeId1 and NodeId2. These are the same unique Id values for each of these nodes as described in Section 5.3.7, “Defining SQL and Other API Nodes in a MySQL Cluster”.

  • NodeId2

    Effective VersionType/UnitsDefaultRange/ValuesRestart Type
    MySQL 5.1.0numeric[none]...N

    To identify a connection between two nodes it is necessary to provide their node IDs in the [tcp] section of the configuration file as the values of NodeId1 and NodeId2. These are the same unique Id values for each of these nodes as described in Section 5.3.7, “Defining SQL and Other API Nodes in a MySQL Cluster”.

  • HostName1

    Effective VersionType/UnitsDefaultRange/ValuesRestart Type
    MySQL 5.1.0name or IP address[none]...N

    The HostName1 and HostName2 parameters can be used to specify specific network interfaces to be used for a given TCP connection between two nodes. The values used for these parameters can be host names or IP addresses.

  • HostName2

    Effective VersionType/UnitsDefaultRange/ValuesRestart Type
    MySQL 5.1.0name or IP address[none]...N

    The HostName1 and HostName2 parameters can be used to specify specific network interfaces to be used for a given TCP connection between two nodes. The values used for these parameters can be host names or IP addresses.

  • OverloadLimit

    Effective VersionType/UnitsDefaultRange/ValuesRestart Type
    NDB 6.4.0bytes00 - 4294967039 (0xFFFFFEFF)N

    Beginning in MySQL Cluster NDB 6.4.0, this parameter can be used to determine the amount of unsent data that must be present in the send buffer before the connection is considered overloaded. See Section 5.3.14, “Configuring MySQL Cluster Send Buffer Parameters”, for more information.

    Prior to MySQL Cluster NDB 7.0.27 and MySQL Cluster NDB 7.1.16, the effective value of this parameter was limited by the size of SendBufferMemory; beginning with these releases, the actual value for OverloadLimit (up to the stated maximum of 4G) is used instead.

  • SendBufferMemory

    Effective VersionType/UnitsDefaultRange/ValuesRestart Type
    MySQL 5.1.0unsigned256K64K - 4294967039 (0xFFFFFEFF)N
    NDB 7.0.4unsigned2M256K - 4294967039 (0xFFFFFEFF)N

    TCP transporters use a buffer to store all messages before performing the send call to the operating system. When this buffer reaches 64KB its contents are sent; these are also sent when a round of messages have been executed. To handle temporary overload situations it is also possible to define a bigger send buffer.

    Prior to MySQL Cluster NDB 7.0, this parameter determines a fixed amount of memory allocated at startup for each configured TCP connection. Beginning with MySQL Cluster NDB 6.4.0, if this parameter is set explicitly, then the memory is not dedicated to each transporter; instead, the value used denotes the hard limit for how much memory (out of the total available memory—that is, TotalSendBufferMemory) that may be used by a single transporter. For more information about configuring dynamic transporter send buffer memory allocation in MySQL Cluster NDB 7.0 and later, see Section 5.3.14, “Configuring MySQL Cluster Send Buffer Parameters”.

    In MySQL Cluster NDB 6.4.3 and earlier, the default size of the send buffer was 256 KB; in MySQL Cluster NDB 7.0.4 and later, it is 2MB, which is the size recommended in most situations. The minimum size is 64 KB; the theoretical maximum is 4 GB.

  • SendSignalId

    Effective VersionType/UnitsDefaultRange/ValuesRestart Type
    MySQL 5.1.0boolean[see text]true, falseN

    To be able to retrace a distributed message datagram, it is necessary to identify each message. When this parameter is set to Y, message IDs are transported over the network. This feature is disabled by default in production builds, and enabled in -debug builds.

  • Checksum

    Effective VersionType/UnitsDefaultRange/ValuesRestart Type
    MySQL 5.1.0booleanfalsetrue, falseN

    This parameter is a boolean parameter (enabled by setting it to Y or 1, disabled by setting it to N or 0). It is disabled by default. When it is enabled, checksums for all messages are calculated before they placed in the send buffer. This feature ensures that messages are not corrupted while waiting in the send buffer, or by the transport mechanism.

  • PortNumber (OBSOLETE)

    This formerly specified the port number to be used for listening for connections from other nodes. This parameter is deprecated as of MySQL 5.1.3 and should no longer be used; use the ServerPort data node configuration parameter for this purpose instead.

  • ReceiveBufferMemory

    Effective VersionType/UnitsDefaultRange/ValuesRestart Type
    MySQL 5.1.0bytes64K16K - 4294967039 (0xFFFFFEFF)N
    NDB 7.0.4bytes2M16K - 4294967039 (0xFFFFFEFF)N

    Specifies the size of the buffer used when receiving data from the TCP/IP socket.

    In MySQL Cluster NDB 6.4.3 and earlier, the default value of this parameter was 64 KB; beginning with MySQL Cluster NDB 7.0.4, 2MB is the default. The minimum possible value is 16KB; the theoretical maximum is 4GB.

  • TCP_RCV_BUF_SIZE

    Effective VersionType/UnitsDefaultRange/ValuesRestart Type
    NDB 6.1.1unsigned700801 - 2GN

    Determines the size of the receive buffer set during TCP transporter initialization. The default is recommended for most common usage cases.

    TCP_RCV_BUF_SIZE was added in MySQL Cluster NDB 6.1.1.

  • TCP_SND_BUF_SIZE

    Effective VersionType/UnitsDefaultRange/ValuesRestart Type
    NDB 6.1.1unsigned715401 - 2GN

    Determines the size of the send buffer set during TCP transporter initialization. The default is recommended for most common usage cases.

    TCP_SND_BUF_SIZE was added in MySQL Cluster NDB 6.1.1.

  • TCP_MAXSEG_SIZE

    Effective VersionType/UnitsDefaultRange/ValuesRestart Type
    NDB 6.1.1unsigned00 - 2GN

    Determines the size of the memory set during TCP transporter initialization. The default is recommended for most common usage cases.

    TCP_MAXSEG_SIZE was added in MySQL Cluster NDB 6.1.1.

  • TcpBind_INADDR_ANY

    Setting this parameter to TRUE or 1 binds IP_ADDR_ANY so that connections can be made from anywhere (for autogenerated connections). The default is FALSE (0).

    This parameter was added in MySQL Cluster NDB 6.2.0.