负载平衡客户端连接

发布于 2024-09-05 18:51:45 字数 141 浏览 2 评论 0原文

我们有 5000+ 客户端、10 台网关服务器和 6 台后端服务器。网关和后端服务器都在同一个集群中。如果在客户端和gaetway服务器上使用v7.0.1,如果使用CCDT,可以进行循环负载平衡吗?我们希望在所有 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 clients 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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

如何视而不见 2024-09-12 18:51:45

很高兴您在客户端和服务器上都使用 WMQ v7.0.1!获得负载平衡的技巧在于如何在 CCDT 中标记通道。当您构建 CCDT 文件时,QMNAME 参数不需要与实际的 QMgr 名称匹配。事实上,将其称为 QMNAME 是相当不幸的,因为它导致人们期望它与客户端连接到的 QMgr 名称之间存在某种相关性。事实上,它只是客户端应用程序在搜索 CCDT 时使用的索引。

因此,当您为 10 个 QMgr 构建 CCDT 时,每个 QMgr 都需要不同的通道名称,但对所有通道使用相同的 QMgr 名称。例如,

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)

然后当应用程序需要连接时,它指定 GTWY.QMGR 作为 QMgr 名称。这解析为通道条目组。

好的,这样就可以进行故障转移,但不能进行负载平衡。要实现负载平衡,您需要设置 CLNTWGHT 和 AFFINITY 参数,如 V7 文档中 通道权重和亲和力示例部分中所述。我建议通读整个父部分 将 WebSphere MQ 客户端应用程序连接到队列管理器,特别是有关 CCDT 和MQCONN。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文