|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Many clients connect to MQ Cluster |
« View previous topic :: View next topic » |
Author |
Message
|
alexraczel |
Posted: Mon Jun 11, 2007 6:52 am Post subject: Many clients connect to MQ Cluster |
|
|
Newbie
Joined: 10 Jun 2007 Posts: 4
|
I am new to MQ and would like to ask for recommendation / feasible setup for load balancing:
Description of setup:
- Multiple Client applications on workstations send / receive message to / from Queue Manager 1 on remote Machine A
- Server applications running on machine A to receive requests from the Queue Manager 1 and reply to the multiple clients
If add Machine B and Queue Manager 2, same Server applications run on it. How can I use MQ Cluster to serve load balancing requirement ?
1. Now, multiple Client send message to QM 1 on Machine A. What to do to point to both QM on both machines ?
2. Now, multiple Client receive message from QM 1 on Machine A. What to do to point to both QM on both machines ?
I don't think it is possible to install MQ on client machines since there are so many clients. If 100 clients, need to purchase 100 more MQ license.
Please help and advise !
The next question will be consider HA... but will need to serve the load balance first. .... |
|
Back to top |
|
 |
Vitor |
Posted: Mon Jun 11, 2007 7:06 am Post subject: Re: Many clients connect to MQ Cluster |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
alexraczel wrote: |
1. Now, multiple Client send message to QM 1 on Machine A. What to do to point to both QM on both machines ?
2. Now, multiple Client receive message from QM 1 on Machine A. What to do to point to both QM on both machines ?
|
You don't say if you're using MQ v5.3 or v6. If you're using v5.3, get the clients to connect to a gateway queue manager(s), use that to distribute the messages through the cluster. If you're using v6, you can connect directly to one or other of the existing queue managers & use the new clustering parameters to arrange for message distribution.
alexraczel wrote: |
I don't think it is possible to install MQ on client machines since there are so many clients. If 100 clients, need to purchase 100 more MQ license.
|
There is no need. Client connections are fine.
alexraczel wrote: |
The next question will be consider HA... but will need to serve the load balance first. .... |
HA is nothing to do with load balancing, and MQ clusters are not suited to HA. You'll find a number of discussions here where I've ranted about this on the board. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
alexraczel |
Posted: Mon Jun 11, 2007 8:19 am Post subject: |
|
|
Newbie
Joined: 10 Jun 2007 Posts: 4
|
Thanks !
Quote: |
If you're using v6, you can connect directly to one or other of the existing queue managers & use the new clustering parameters to arrange for message distribution.
|
I am using v6 and the client program is written by JMS 1.1. I can use the new clustering parameters in JNDI configuration to send the clustering, can't it ?
For receive from cluster, do you mean the client will automatically read from both QM on 2 machines ?
Quote: |
HA is nothing to do with load balancing, and MQ clusters are not suited to HA. You'll find a number of discussions here where I've ranted about this on the board.
|
One approach from the MQ document is to add a shared disk. I don't know if the below works or not using together with Cluster and persistent message :
- add 1 more QM to each machine, and join these 2 to cluster
- i.e. QM1 and QM3 on Machine A
QM2 and QM4 on Machine B
- QM3 and QM4 are not active normally
- QM3 points to QM2's files on shared disk
QM4 points to QM1's files on shared disk
Scenario :
1. Before fail, use QM1 and QM2 load balance
2. After fail (say Machine A and QM1), QM4 on Machine B takes up the job of QM1
Please advise if the setting is possible ..... to take advantage of Active Active and support failover .....  |
|
Back to top |
|
 |
Vitor |
Posted: Mon Jun 11, 2007 10:33 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
alexraczel wrote: |
I am using v6 and the client program is written by JMS 1.1. I can use the new clustering parameters in JNDI configuration to send the clustering, can't it ? |
No idea. I know they're set as part of the MQ adminitration, maybe it can be done via JNDI, I don't know enough about JNDI. Why would you want to?
alexraczel wrote: |
For receive from cluster, do you mean the client will automatically read from both QM on 2 machines ?
|
No I don't mean that. Clusters distribute messages not connections - check the manual!
alexraczel wrote: |
One approach from the MQ document is to add a shared disk.
|
Which document?
alexraczel wrote: |
Please advise if the setting is possible ..... to take advantage of Active Active and support failover .....  |
IMHO you should set your cluster up to load balance as required by your site. Once that's done, then use some HA software to ensure availability. Don't use clusters for HA - they're not intended for that and you can get problems.
The question "how do I use a cluster for HA" has been asked endlessly in this forum. Read through some of the old posts for other views. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
alexraczel |
Posted: Mon Jun 11, 2007 5:49 pm Post subject: |
|
|
Newbie
Joined: 10 Jun 2007 Posts: 4
|
Quote: |
alexraczel wrote:
Now, multiple Client receive message from QM 1 on Machine A. What to do to point to both QM on both machines ?
|
Quote: |
Victor wrote:
If you're using v6, you can connect directly to one or other of the existing queue managers & use the new clustering parameters to arrange for message distribution.
|
Quote: |
alexraczel wrote:
For receive from cluster, do you mean the client will automatically read from both QM on 2 machines ?
|
Quote: |
Victor wrote:
No I don't mean that. Clusters distribute messages not connections
|
This is the point I don't understand after read the manual. It will be fine if anybody willing to give me some hint / experience sharing.
MQ document says that "You can only GET from a local cluster queue, but you can PUT to any queue in a cluster. If you open a queue to use the MQGET command, the queue manager will only use the local queue." (CSQZAH07 Queue Manager Clusters http://www-306.ibm.com/software/integration/wmq/library/library6x.html)
Now, client send out message to remote cluster queue (form by QM1 and QM2).
To receive message, client need to listen to queues on both QM1 and QM2 ?
Quote: |
Victor wrote:
Which document?
|
"MC91: High Availability for WebSphere MQ on UNIX platforms" mentioned approach for HA. It mentioned that "two types of cluster can used together to good effect." (Page no. 3).
I would like to consider different approach using both "WMQ Cluster" and "HA cluster" for the case of many MQ clients and 2 QMs.
Thank you !  |
|
Back to top |
|
 |
fjb_saper |
Posted: Mon Jun 11, 2007 8:06 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
alexraczel wrote: |
This is the point I don't understand after read the manual. It will be fine if anybody willing to give me some hint / experience sharing.
MQ document says that "You can only GET from a local cluster queue, but you can PUT to any queue in a cluster. If you open a queue to use the MQGET command, the queue manager will only use the local queue." (CSQZAH07 Queue Manager Clusters http://www-306.ibm.com/software/integration/wmq/library/library6x.html)
Now, client send out message to remote cluster queue (form by QM1 and QM2).
To receive message, client need to listen to queues on both QM1 and QM2 ? |
OK what you have here is a typical request response pattern with the load balancing for the server process.
Let's look at it this way:
2 gateways GA and GB qmgrs.
2 processing qmgrs PR1 and PR2.
So you put the request on GA specifying the qname on PR1 (same as qname on PR2) and leaving the qmgr blank. Cluster resolution tells you that the message will be processed by either PR1 or PR2 and you have no way of knowing which.
Your question is how do I get my response.
When you send in the request you specify on the request message the response queue and qmgr. In this case you are putting the message on GA so you choose a local queue on GA: Replyto qmgr = GA, Replyto Queue = GA.LOCAL.QUEUE.
As GA is part of the cluster the routing and resolution is known to both PR1 and PR2. You have just done away with the traditional P2P qmgr aliasing and default routing, the cluster does it for you! No need to define a remote queue on either PR1 or PR2 for the reply to queue on GA. In fact it could be a dynamic temporary queue.
So the response is local to a qmgr you are connected to (GA).
At this point as you can see GA and GB are interchangeable and PR1 and PR2 are interchangeable. There lies your cluster advantage.
And remember the rule: you ask for the response to be sent to a local queue on the qmgr you sent the request from.
Enjoy and read up in the clustering manual...  _________________ MQ & Broker admin |
|
Back to top |
|
 |
halbe01 |
Posted: Tue Jun 12, 2007 1:40 am Post subject: |
|
|
Novice
Joined: 02 Feb 2005 Posts: 16
|
Quote: |
You don't say if you're using MQ v5.3 or v6. If you're using v5.3, get the clients to connect to a gateway queue manager(s), use that to distribute the messages through the cluster. If you're using v6, you can connect directly to one or other of the existing queue managers & use the new clustering parameters to arrange for message distribution. |
This is interesting to me - however I can't find any specifics in the documentation about the extra cluster params in v6. Could you elaborate on this? Is there a new param which allows me to connect to a cluster QM, put to a cluster queue, and for that message to be workload balanced and not just placed on the local instance?
Cheers,
Ben. |
|
Back to top |
|
 |
Vitor |
Posted: Tue Jun 12, 2007 1:48 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
halbe01 wrote: |
This is interesting to me - however I can't find any specifics in the documentation about the extra cluster params in v6. |
From the "Summary of Changes - changes in this edition" in the v6 Cluster manual:
Quote: |
Improved workload management for message distribution. New rank, priority, use-queue, most recently used, and weight attributes for queues, queue managers and cluster channels provide better control over workload distribution. This allows greater flexibility in the distribution of messages within clusters and around intersecting clusters, easier creation of backup or standby networks (where these queue managers are only used when all ’normal’ queue managers are unavailable), easier restriction of number of active outbound channels, easier channel weighting to ensure that more powerful machines are sent more work by means of a new channel weighting factor. For related information, see Chapter 12, “Workload balancing attributes" |
Look up CLWLRANK & CLWLUSEQ _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|