Author |
Message
|
anveshita |
Posted: Wed Mar 07, 2012 10:57 am Post subject: Cluster Workload Balancing- a specific scenario |
|
|
Master
Joined: 27 Sep 2004 Posts: 254 Location: Jambudweepam
|
I have searched the forums but could not find applicable answers.
I have three QMs shared in a cluster and the messages get load balanced evenly when I have steady stream of messages say when I have batch process reading files and putting it to the cluster queue, then all three queue managers get the messages evenly. However when I have messages coming in intermittently input by an online users few messages at different intervals, I find the messages are not getting distributed evenly. Doesn't workload balancing applicable on such situations. What needs to be done if I want messages to be routed round-robin to all servers despite the rate of arrival?
Thanks |
|
Back to top |
|
 |
exerk |
Posted: Wed Mar 07, 2012 11:02 am Post subject: |
|
|
 Jedi Council
Joined: 02 Nov 2006 Posts: 6339
|
And just how are those 'online users' connecting to each queue manager? _________________ It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys. |
|
Back to top |
|
 |
anveshita |
Posted: Wed Mar 07, 2012 11:07 am Post subject: |
|
|
Master
Joined: 27 Sep 2004 Posts: 254 Location: Jambudweepam
|
The online users or the batch users are not connected to the cluster directly. We have a datapower that takes messages from the input queue and puts them on the cluster queue. |
|
Back to top |
|
 |
mqjeff |
Posted: Wed Mar 07, 2012 11:10 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
anveshita wrote: |
The online users or the batch users are not connected to the cluster directly. We have a datapower that takes messages from the input queue and puts them on the cluster queue. |
And did you confirm that DataPower was not using BIND ON OPEN?
Did you research the mechanisms that an MQ cluster uses to determine how to load balance messages? That this is done based on channel status information, and not on anything else? |
|
Back to top |
|
 |
anveshita |
Posted: Wed Mar 07, 2012 11:27 am Post subject: |
|
|
Master
Joined: 27 Sep 2004 Posts: 254 Location: Jambudweepam
|
I will have to check. Can you please explain BIND ON OPEN could affect the situation I indicated? |
|
Back to top |
|
 |
mqjeff |
Posted: Wed Mar 07, 2012 11:28 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
anveshita wrote: |
I will have to check. Can you please explain BIND ON OPEN could affect the situation I indicated? |
What if DataPower re-opened the queue after some period of inactivity? |
|
Back to top |
|
 |
bruce2359 |
Posted: Wed Mar 07, 2012 11:39 am Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
anveshita wrote: |
Can you please explain BIND ON OPEN could affect the situation I indicated? |
BIND_ON_OPEN, and its alternatives, are well-documented in the WMQ Clusters manual, and InfoCenter equivalent. Additional information can be found in the WMQ Application Programming Reference, and WMQ Application Programming Guide. _________________ I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live. |
|
Back to top |
|
 |
anveshita |
Posted: Wed Mar 07, 2012 11:40 am Post subject: |
|
|
Master
Joined: 27 Sep 2004 Posts: 254 Location: Jambudweepam
|
I do not know what effect it will have. Can you pl explain what you would like to check by asking if Datapower can reopen the q? |
|
Back to top |
|
 |
Vitor |
Posted: Wed Mar 07, 2012 12:14 pm Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
anveshita wrote: |
I do not know what effect it will have. |
It affects how the cluster determines what queue manager in the cluster to route the message to. Review the description of how this is calculated in the documentation; it's not strict round robin. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
bruce2359 |
Posted: Wed Mar 07, 2012 12:35 pm Post subject: Re: Cluster Workload Balancing- a specific scenario |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
anveshita wrote: |
I find the messages are not getting distributed evenly. |
The clustering workload balancing algorithm is not a guarantee as to distribution of messages. In a real-life clustering environment, it is unlikely that you will ever find messages getting distributed evenly. _________________ I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live. |
|
Back to top |
|
 |
anveshita |
Posted: Wed Mar 07, 2012 12:43 pm Post subject: |
|
|
Master
Joined: 27 Sep 2004 Posts: 254 Location: Jambudweepam
|
Bruce2359:
This is what I know about bind on open:
If you want to distribute workload, the apps should not be doing bind on open. For round robin to work, the queue should specify the parameter DEFBIND(NOTFIXED) and the queue should be opened with the option MQOO_BIND_NOT_FIXED.
mqjeff:
by reopening the the queue from datapower after some inactivity, you think that the cluster would be able to do a round robin? ( or atleast route the messages NEARLY even fashion) |
|
Back to top |
|
 |
Vitor |
Posted: Wed Mar 07, 2012 12:59 pm Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
anveshita wrote: |
If you want to distribute workload, the apps should not be doing bind on open. For round robin to work, the queue should specify the parameter DEFBIND(NOTFIXED) and the queue should be opened with the option MQOO_BIND_NOT_FIXED. |
The important thing is that the queue should be opened as you indicate or the queue set as you indicate and the queue opened using the queue defaults. It's the application that determines this.
anveshita wrote: |
by reopening the the queue from datapower after some inactivity, you think that the cluster would be able to do a round robin? ( or atleast route the messages NEARLY even fashion) |
It all hinges on how the routing is calculated. Look this up.
Also, why do you need it to be so even? If there's been a period of inactivity (i.e. no messages) why does it matter if the message is routed to the same queue manager that handled the last message? Or if 3 single messages arrive 3 minutes apart they're all routed to the same queue manager? _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
mqjeff |
Posted: Wed Mar 07, 2012 1:09 pm Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
anveshita wrote: |
mqjeff:
by reopening the the queue from datapower after some inactivity, you think that the cluster would be able to do a round robin? ( or atleast route the messages NEARLY even fashion) |
No.
I'm saying that if DataPower is using BIND ON OPEN then it would explain what you are seeing if Datapower was also closing and reopening the queue sometimes.
I.e. that message 1 comes in, but the queue is closed, so DataPower opens it and sends it. Then message 2 comes in, and the queue is still open, so datapower sends it again (but to the same place because it's BOUND ON OPEN). Then no more messages come for a while, so Datapower closes the queue. |
|
Back to top |
|
 |
bruce2359 |
Posted: Wed Mar 07, 2012 2:37 pm Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
If absolute, even distribution of messages is a mandatory requirement of your application, clustering is not for you.
Briefly, very briefly:
Application BIND-ON-OPEN (or application BIND_AS_Q_DEF with queue attribute set to BIND_ON_OPEN) causes the cluster workload management message distribution algorithm to open ONE instance of the destination queue, and continue to use that queue for puts until the app closes the queue.
Application BIND_NOT_FIXED (or equivalents - see above) causes the cluster workload management message distribution algorithm to open ONE instance of the destination queue, and put to that queue until it (the queue) becomes unavailable. When the queue becomes unavailable, the next put attempt will cause the algorithm to open the next instance of destination queue for puts. _________________ I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live. |
|
Back to top |
|
 |
PeterPotkay |
Posted: Wed Mar 07, 2012 5:04 pm Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
bruce2359 wrote: |
Application BIND_NOT_FIXED (or equivalents - see above) causes the cluster workload management message distribution algorithm to open ONE instance of the destination queue, and put to that queue until it (the queue) becomes unavailable. When the queue becomes unavailable, the next put attempt will cause the algorithm to open the next instance of destination queue for puts. |
If the app opens the queue once with BIND_NOT_FIXED (corrected, incorrectly was typed as BIND_NOT_OPEN)), and starts pumping messages, the cluster will load balance the messages across the total number of destination queues, assuming all are equally weighted targets according to the cluster algorithm rules. _________________ Peter Potkay
Keep Calm and MQ On
Last edited by PeterPotkay on Thu Mar 08, 2012 7:24 pm; edited 1 time in total |
|
Back to top |
|
 |
|