Server List Syntax

Using server lists enables CONNX to connect to multiple servers, thus providing scalability and increased fault tolerance.

Depending upon its use, a server list identifies either one or more JDBC servers or one or more data servers.

Server Used as
JDBC Server The value of the HOST parameter in the CXGMSRV macro.
Data Server The value of the (default) server name field in the CDD.
Data Server The server name in the HOST clause of the CREATE DATABASE statement.

This document covers the following topics:


Syntax

Server list syntax takes the following format:

host[:port][!host[:port]][!host[:port]]...[!DISTRIBUTE]

Note:
Entries in the server list must be separated by an exclamation (!) mark.

The DISTRIBUTE keyword can be used to implement system architectures that support::

  • Fault Tolerance (without DISTRIBUTE). The connections go to the first server in the list, unless that server is down. If the connection fails for that server, it will then serially loop through all the servers from that point forward, until all options are exhausted, or a successful connection is established.

  • Scalability and Load Distribution (with DISTRIBUTE). The connections are randomly distributed between all servers specified. CONNX will initially pick an entry in the server list at random. If the connection fails for that server, it will then serially loop through all the servers from that point forward, wrapping back around to the beginning if necessary, until all options are exhausted, or a successful connection is established.

Fault Tolerance Example

The following server list defines redundant servers (a primary and secondary server):

srv1.myhost.org!srv2.myhost.org

If the connection to the primary server fails, it will attempt to connect to the secondary server.

Scalability and Load Distribution Example

The following server list defines alternate servers (load distribution):

srv1.myhost.org!srv2.myhost.org!DISTRIBUTE

The connections are randomly distributed between the servers.