ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » General Discussion » Connection to QMGRS using CCDT, balance logic

Post new topic  Reply to topic
 Connection to QMGRS using CCDT, balance logic « View previous topic :: View next topic » 
Author Message
dimaeon
PostPosted: Fri Aug 05, 2016 12:56 am    Post subject: Connection to QMGRS using CCDT, balance logic Reply with quote

Novice

Joined: 27 Jul 2016
Posts: 21

Hi,
I have 4 managers and 40 client applications. I'am using CCDT to connect first 10 app to manager 1, other 10 to manager 2...
So if i stop for example manager 1, first 10 app connecting to manager 2 using CCDT. Can you explain me best logic for using CCDT in this example
What i do
1) In CCDT if affinity is 0 for all channels, it says that all first 10 app everytime connecting firstly to manager 1, then with delay 1sec connecting to manager 2. So, every connection (lets think that we have only 5 min for such problem while manager 1 stopped) will take a lot of time.
2) If use affnity > 0 , it means that manager's 1 channel will go to the end of list, but we won't have delay, because now manager's 2 channel is prefered.
After 5 mins, my first 10 apps must connect to manager 1 again and if i using method 1) all is ok, but slow connect. If use method 2 it means, that we have to go through manager 2, manager 3, and manager 4 to back to manager 1. It takes a lot of time also.
Please help me to make balance logic, may be i dont understand something
And one more question. IBM sometimes says that parametr CLNTWGHT is only for cluster channel's, but gives me example for CLNTCONN channel. I am using CLNTCONN channels (websphere mq 7.5). So, CLNTWGHT doesnt important for me? only zero and non-zero value?
Back to top
View user's profile Send private message
dimaeon
PostPosted: Fri Aug 05, 2016 1:07 am    Post subject: Reply with quote

Novice

Joined: 27 Jul 2016
Posts: 21

And i have 4 managers in group QM1, QM2, QM3, QM4
Connecting with *GRP.
I can define channel's on every manager or can set "connection name" like host1(port), host2(port)... What will be better? Is there difference between two defines? Or may be for my example will be better to define/use some other method? not group or something else
Back to top
View user's profile Send private message
PaulClarke
PostPosted: Fri Aug 05, 2016 9:02 pm    Post subject: Reply with quote

Grand Master

Joined: 17 Nov 2005
Posts: 1002
Location: New Zealand

Hi,

That is quite a lot of statements and questions I am still not sure what you are trying to do. Let me take one or two of the questions.

  • Multiple channels or using CONNAME(host1,host2,host3)
    These are very similar but if using multiple channels clearly gives you more flexibility. You can use CLNTWGHT etc. You can define security features differently depending on which QM you are connecting to. Plus you don't necessarily have to define the same SVRCONN on all your Queue Managers. It depends on your naming convention. The downside of course is you have more channel definitions to manage.

  • CLNTWGHT only available on cluster channels?
    I have not heard this before. Are you sure you're not mixing up CLWLWGHT and CLNTWGHT. One is for setting a weighting within the cluster and one is for setting a weighting for client channels. It is possible that the IBM manuals have a spelling error somewhere.

So, what are you trying to do? If you have 40 channels connecting to 4 Queue Managers do you want them to be randomly spread or do you want certain clients to always prefer certain Queue Managers ?
As for reconnecting taking time it certainly can. Especially if the machine itself rather than just the Queue Manager is down. TCP/IP can be slow in identifying that an IP address is not available. You can mitigate this to some extent by telling MQ to only wait for so many seconds before trying the other address.

Cheers,
Paul.[/list]
_________________
Paul Clarke
MQGem Software
www.mqgem.com
Back to top
View user's profile Send private message Visit poster's website
dimaeon
PostPosted: Sun Aug 07, 2016 11:07 pm    Post subject: Reply with quote

Novice

Joined: 27 Jul 2016
Posts: 21

Now i am using Multiple channels. But i havnt 40 channels, only 4. For example:
QM1: CHAN1(SVRCONN), CHAN1(CLNTCONN), CHAN2(CLNTCONN), CHAN3(CLNTCONN), CHAN4(CLNTCONN)
QM2: CHAN2(SVRCONN), CHAN1(CLNTCONN), CHAN2(CLNTCONN), CHAN3(CLNTCONN), CHAN4(CLNTCONN)
QM3: CHAN3(SVRCONN) ...
QM4: CHAN4(SVRCONN) ...
I must define the pair SVRCONN-CLNTCONN with the same, right? and all CLNTCONN channels in group. May be i must define 40 channels? but i dont understand why
Quote:

Plus you don't necessarily have to define the same SVRCONN on all your Queue Managers

I thought that the same SVRCONN name on all managers is good idea, for reason i began to look for alternative method and found CONNAME. I dont need to define every CLNTCONN groups's channels on every Queue Manager. But as you say, i cant to set CLNTWGHT and SSL for every, thanks.
If i will try to use revocation list, no matter what method i will choose?

I want that every 10 client-application will always connect to their QueueManagers.
1-10app - QM1
11-20app - QM2
21-30app - QM3
31-40app - QM4
But if one manager (QM1) will stop (only for 5 minutes), 1-10app will migarte, for example, to QM2 and after 5 mins return to QM1. So, i want the minimum waste of time to do this.

And one more question about CLNTWGHT in CCDT. I will copy it to the client side, so CCDT file wont be modified For example i have the follow strings:
CHAN1(CLNTCONN) host,port, CLNTWGHT 1 etc
CHAN2(CLNTCONN) host,port, CLNTWGHT 5 etc
CHAN3(CLNTCONN) host,port, CLNTWGHT 4 etc
CHAN4(CLNTCONN) host,port, CLNTWGHT 2 etc
Now i stop QM1 (CHAN1) and my app will connect to QM2 (CHAN2). Where this logic is describes? I say about new priority. Can understand if i will say clientapp to use CCDT in QMGRdirectory and if something will change in CCDT that describes new priority CCDT will modify, but as i understood, CCDT not changing at this moment. Also dont use QM's CCDT directory. So, where this information is saving? may be it is stupid question but i dont understand where application will save information about new priority
Thanks for help
Back to top
View user's profile Send private message
dimaeon
PostPosted: Sun Aug 07, 2016 11:29 pm    Post subject: Reply with quote

Novice

Joined: 27 Jul 2016
Posts: 21

And what the strange logic with CLNTWGHTS? As i understood it is only probability. With the higher number higher probability. With first connection system generates random number and then creates priority list? and where this information is saving?
Back to top
View user's profile Send private message
sami.stormrage
PostPosted: Mon Aug 08, 2016 4:14 am    Post subject: Reply with quote

Disciple

Joined: 25 Jun 2008
Posts: 186
Location: Bangalore/Singapore

may be this will help in understanding the concept better.

http://www.ibm.com/support/knowledgecenter/SSFKSJ_8.0.0/com.ibm.mq.ref.con.doc/q081750_.htm

your English is bit broken; making it hard to understand the point you are trying to make.
_________________
*forgetting everything *
Back to top
View user's profile Send private message Yahoo Messenger
PaulClarke
PostPosted: Mon Aug 08, 2016 9:29 am    Post subject: Reply with quote

Grand Master

Joined: 17 Nov 2005
Posts: 1002
Location: New Zealand

Sorry dimaeon, when I said 40 channels I meant you have 40 channels (ie. clients) connecting in to your Queue Managers - 40 channel instances if you will, not that you would have 40 channel definitions, sorry for the confusion.

I am not entirely sure why you want to ensure that particular Applications ( clients ) connect to particular Queue Managers in a particular order. Usually in these circumstances where you have a large number of clients connecting in to a set of Queue Managers you want to treat all the clients equally. ie. you want to randomly spread the clients across the Queue Managers. In this way you can provide a single CCDT which describes the situation using CLNTWGHT. Suppose, for example, that you had 4,000 clients you wanted to spread across 20 Queue Managers. Would you still be adopting the approach you are ?

However, if you really really want to dictate the order each machine uses let me see if I understand you correctly.

You have 4 different groups of machines. One than that would like to try the Queue Managers in the order QM1, QM2, QM3, QM4. Another than would like to try the Queue Managers in the order QM2, QM3, QM4, QM1 etc etc.

I can't think of any way to get MQ to do this for you 'automatically' - as I say, MQ is geared to treat them all the same The idea of providing a single CCDT which somehow automatically generates four different behaviors just by virtue of being installed on a different machine seems optimistic. The only way I can think of is to define the channels explicitly. Again you could either do this using host lists or individual channels. If we did it using host lists we could define.

Code:

DEFINE CHL(QM1234) CHLTYPE(CLNTCONN) QMNAME(QM1234) CONNAME(host1, host2, host3, host3)
DEFINE CHL(QM4321) CHLTYPE(CLNTCONN) QMNAME(QM4321) CONNAME(host4, host3, host2, host1)
DEFINE CHL(QM4231) CHLTYPE(CLNTCONN) QMNAME(QM4231) CONNAME(host4, host2, host5, host1)
etc
etc


So now an application just issues MQCONN(*QM1234) to get one ordering or MQCONN(*QM4231) to get another ordering.

Of course if we always want the application to be able to say MQCONN(*QMGROUP) then you could define 4 different CCDT files, each with a different ordering, and just install the appropriate file on each machine.

Anyway, just a suggestion which may or may not work for you but it's all I can think of if you want the logic to be totally in the CCDT. The other approaches would be to let the applications do the processing or you could write a client channel exit to make a dynamic choice.

Hope this helps,

Paul.
_________________
Paul Clarke
MQGem Software
www.mqgem.com
Back to top
View user's profile Send private message Visit poster's website
dimaeon
PostPosted: Mon Aug 08, 2016 11:20 pm    Post subject: Reply with quote

Novice

Joined: 27 Jul 2016
Posts: 21

Thanks PaulClarke,
I forgot to say that wanted to use 4 deffirent CCDT files, for 1-10app - CCDT1 etc.
And one more question. IBM says about CLNTWGHT "The distribution of connections between two or more channels with non-zero weightings is proportional to the ratio of those weightings. For example, three channels with CLNTWGHT values of 2, 4, and 14 are selected approximately 10%, 20%, and 70% of the time. This distribution is not guaranteed. If the AFFINITY attribute of the connection is set to PREFERRED, the first connection chooses a channel definition according to client ". Ok, i set
CLNTCONN1 CLNTWGHT - 1
CLNTCONN2 CLNTWGHT - 1
CLNTCONN3 CLNTWGHT - 1
CLNTCONN4 CLNTWGHT - 1
and trying to connect. So, as i understood, probability of connecting to each 25%, right? But client always connect through CLNTCONN1 then CLNTCONN2 etc.
If i set
CLNTCONN1 CLNTWGHT - 1
CLNTCONN2 CLNTWGHT - 70
CLNTCONN3 CLNTWGHT - 80
CLNTCONN4 CLNTWGHT - 99
also priority is CLNTCONN1 then CLNTCONN2 etc.
My system looks like:
QueueManager1 (SVRCONN1, CLNTCONN1, CLNTCONN2, CLNTCONN3 CLNTCONN4)
QueueManager2 (SVRCONN2, CLNTCONN1, CLNTCONN2, CLNTCONN3 CLNTCONN4)
QueueManager3 (SVRCONN3, CLNTCONN1, CLNTCONN2, CLNTCONN3 CLNTCONN4)
QueueManager4 (SVRCONN4, CLNTCONN1, CLNTCONN2, CLNTCONN3 CLNTCONN4)
QueueManagers in group (GRP)
Connecting using (*GRP)
Really i dont see difference between CLNTWGHT 1 - 99, only between zero and non-zero.

sami.stormrage linked.
Quote:
http://www.ibm.com/support/knowledgecenter/SSFKSJ_8.0.0/com.ibm.mq.ref.con.doc/q081750_.htm

In theory all is ok, but in practice...
My app always connect in priority describes in CCDT and ignoring CLNTWGHTS.

Sorry, and one more moment)
CONNAME(host1, host2, host3) means, that connection will go to host1, then host2, then host3? Ok, connecting my app and stopping host1(QM1), connection really goes to host2.
Using CONNAME(host2, host3, host1) also all is ok
But using CONNAME(host3, host2, host1), if i stopping host3 connection goes to host1. Why? (host2 is avaible)
Sorry for my English
Back to top
View user's profile Send private message
mqjeff
PostPosted: Tue Aug 09, 2016 3:41 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Is your app only using one MQCONN?

If so, that's why you only see it going to QueueManager1.

Have your app use 10 MQCONN (connections) to the same SVRCONN, and see whta happens.
_________________
chmod -R ugo-wx /
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General Discussion » Connection to QMGRS using CCDT, balance logic
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.