How automatic balancing works

In the uniform cluster, client connections are grouped together based on the application name. Applications that connect to any member of the uniform cluster using the same application name are considered to be equivalent to any other applications using the same application name.

Auto-balancing ensures an even spread of application instances across members of the cluster; see Applications names and application instances for more information. Use the DSP APSTATUS command to display the status of one or more applications, and application instances, connected to a queue manager or a uniform cluster.

For example, you could set all instances of an insurance request application to have an application name of “INSURANCE.REQUESTS”. Related connections from this application will be automatically grouped into instances where appropriate, with all balancing performed on a per-instance basis.

When new instances of the application connect to a member of the uniform cluster, the auto-balancing algorithm assesses which queue managers have the fewest instances of INSURANCE.REQUESTS and redirects some connections to those queue managers.

Automatic balancing is enabled in the following circumstances only:

  • The SHARECNV value of the channel is greater than zero.
  • One of the following is true:

    • The client application specifies MQCNO_RECONNECT
    • The mqclient.ini file specifies Defrecon=YES

Note: Applications with queue manager affinity - for example because of a durable subscription or dynamic reply to queue - cannot safely be rebalanced and should either use MQCNO_RECONNECT_QMGR or no reconnect option at all.

When a client is redirected to an alternative queue manager it will, as usual, use the local client channel definition tables (CCDTs) to locate the connection information for the new target. It is, therefore, important for smooth and efficient operation of auto-balancing, that clients use a CCDT containing an entry for each member of the uniform cluster, as well as any queue manager group used to balance the initial connections.

Use of a JSON format CCDT simplifies this, as it allows multiple connections using the same server connection name. For more information, see Client channel definition table in JSON format.

Parent topic: About uniform clusters


Related concepts