开发者

Load balancing the Client connections

开发者 https://www.devze.com 2023-01-03 17:10 出处:网络
We have 5000+ clients, 10 gateway servers and 6 backend servers. Both gateway and backend Servers are in same cluster. If v7.0.1 is used on cli开发者_JS百科ents and gaetway servers, is round robin loa

We have 5000+ clients, 10 gateway servers and 6 backend servers. Both gateway and backend Servers are in same cluster. If v7.0.1 is used on cli开发者_JS百科ents and gaetway servers, is round robin load balancing possible if CCDT is used? We want distribute load even across all the 10 gateway servers.

Thank You


Great that you are using WMQ v7.0.1 at both the client and server! The trick to getting load balancing is in how you tag the channels in the CCDT. When you build the CCDT file the QMNAME parameter does not need to match the actual QMgr name. In fact, calling it QMNAME is rather unfortunate because it leads to the expectation that there is some correlation between that and the QMgr name the client connects to. In fact, it is just an index for the client app to use while searching the CCDT.

So when you build the CCDT for your 10 QMgrs, each will need a different channel name but use the same QMgr name for all. So for example,

DEF CHL(QMGR01.CLNT) CHLTYPE(CLNTCONN) QMNAME(GTWY.QMGR)
DEF CHL(QMGR02.CLNT) CHLTYPE(CLNTCONN) QMNAME(GTWY.QMGR)
...
DEF CHL(QMGR10.CLNT) CHLTYPE(CLNTCONN) QMNAME(GTWY.QMGR)

Then when the application needs to connect it specifies GTWY.QMGR as the QMgr name. This resolves to the group of channel entries.

OK, so that gets you failover but not load balancing. To get load balancing you will want to set CLNTWGHT and AFFINITY parameters as described in the V7 docs in the section Examples of Channel Weighting and Affinity. I would advise reading through the entire parent section Connecting WebSphere MQ client applications to queue managers, especially the sections on CCDT and MQCONN.

0

精彩评论

暂无评论...
验证码 换一张
取 消