Use clusters for workload management

By defining multiple instances of a queue on different queue managers in a cluster we can spread the work of servicing the queue over multiple servers. There are several factors that can prevent messages being requeued to a different queue manager in the event of failure.

As well as setting up clusters to reduce system administration, we can create clusters in which more than one queue manager hosts an instance of the same queue.

We can organize the cluster such that the queue managers in it are clones of each other. Each queue manager is able to run the same applications and have local definitions of the same queues. For example, in a z/OS parallel sysplex the cloned applications might access data in a shared Db2 or Virtual Storage Access Method (VSAM) database. We can spread the workload between your queue managers by having several instances of an application. Each instance of the application receives messages and runs independently of the others.

The advantages of using clusters in this way are as follows:

  • Increased availability of our queues and applications.
  • Faster throughput of messages.
  • More even distribution of workload in your network.

Any one of the queue managers that hosts an instance of a particular queue can handle messages destined for that queue, and applications do not name a queue manager when sending messages. If a cluster contains more than one instance of the same queue, IBM MQ selects a queue manager to route a message to. Suitable destinations are chosen based on the availability of the queue manager and queue, and on a number of cluster workload-specific attributes associated with queue managers, queues, and channels. See Workload balancing in clusters.

In IBM MQ for z/OS, queue managers that are in queue sharing groups can host cluster queues as shared queues. Shared cluster queues are available to all queue managers in the same queue sharing group. For example, in A cluster with multiple instances of the same queue, either or both of the queue managers QM2 and QM4 can be a shared-queue manager. Each has a definition for the queue Q3. Any of the queue managers in the same queue sharing group as QM4 can read a message put to the shared queue Q3. Each queue sharing group can contain up to 32 queue managers, each with access to the same data. Queue-sharing significantly increases the throughput of our messages.

See the following subtopics for more information about cluster configurations for workload management:

  • Example of a cluster with more than one instance of a queue
    In this example of a cluster with more than one instance of a queue, messages are routed to different instances of the queue. We can force a message to a specific instance of the queue, and we can choose to send a sequence of messages to one of either of the queue managers.
  • Adding a queue manager that hosts a queue locally
    Follow these instructions to add an instance of INVENTQ to provide additional capacity to run the inventory application system in Paris and New York.
  • Use two networks in a cluster
    Follow these instructions to add a new store in TOKYO where there are two different networks. Both need to be available for use to communicate with the queue manager in Tokyo.
  • Use a primary and a secondary network in a cluster
    Follow these instructions to make one network the primary network, and another network the backup network. Use the backup network if there is a problem with the primary network.
  • Adding a queue to act as a backup
    Follow these instructions to provide a backup in Chicago for the inventory system that now runs in New York. The Chicago system is only used when there is a problem with the New York system.
  • Restricting the number of channels used
    Follow these instructions to restrict the number of active channels each server runs when a price check application is installed on various queue managers.
  • Adding a more powerful queue manager that hosts a queue
    Follow these instructions to provide additional capacity by running the inventory system in Los Angeles as well as New York, where Los Angeles can handle twice the number of messages as New York.
  • Application programming and clusters
    You do not need to make any programming changes to take advantage of multiple instances of the same queue. However, some programs do not work correctly unless a sequence of messages is sent to the same instance of a queue.

Parent topic: Configure a queue manager cluster


Related concepts


Related tasks


Related information