大网数据广告活动
服务器运维问答

Distribution of JMS sessions through the load balancer

· 52CE 我爱测

There is a very acute problem with the distribution of sessions through the balancer in case of recovery of one of the fallen nodes. I will describe briefly how the interaction of the two modules is arranged: On the one hand, an …

问题原文

原帖链接 · TheDESTROS · CC BY-SA 4.0

There is a very acute problem with the distribution of sessions through the balancer in case of recovery of one of the fallen nodes.

I will describe briefly how the interaction of the two modules is arranged:

On the one hand, an application on WebShere Application Server (hereinafter referred to simply as WAS)

On the other hand, it is not known which application

Between them - 2 WebSphere MQ servers

WAS applications connect to WebShere MQ through a balancer

The second side connects directly to the MQ servers (because it can distribute connections by itself)

When a problem occurs:

  1. One of the MQ servers crashes. At this point, all sessions are distributed by the balancer to one of the remaining MQ servers. The second application also continues to work with only one MQ server. There is no problem.
  2. It takes some time and the MQ server is restored to work. The second application instantly restores connections to the second MQ server. The balancer continues to keep all sessions on one node, since this JMS and connection pool are quite sufficient (here it is probably worth saying that the application works only through the queue connection factory and without activation specifications). Thus, WAS servers do not read the messages that application 2 places on the server MQ until the connection pool is insufficient and a new session is opened, which is already distributed by the balancer to the second MQ. But this period can be very long and 50% of messages will fall into timeouts (by application 2).

Hence the question.

Is it possible to somehow organize the process so that when restoring the second MQ, part of the sessions on the balancer will either be transferred to the second MQ server, or a new session (instantly) from the WAS side will just be generated (for example, if we start using activation specification maybe) ?

已采纳解答

原帖链接 · JoshMc · CC BY-SA 4.0

If the app on the left side of the diagram is only servicing requests from the app on the right, under current IBM MQ v9.1 LTS and lower one option is to deploy the application twice to each WAS server where each instance is configured to connect directly to a single IBM MQ queue manager bypassing the load balancer. In this way when one MQ server goes down each Websphere application server still has connections from one application instance to the other MQ server to service requests going to the available MQ server, and when the down MQ server comes back up the second application instance on each Websphere application server will reconnect to and service connections on that queue manager.


In MQ v9.1 CD (Continuous Delivery) IBM is adding a new feature called uniform clusters where the queue manager and the client work together to keep connections load balanced across the available queue managers. With this new feature when the 2nd queue manager is restored the 1st queue manager will notify half of the connected clients disconnect and reconnect to the 2nd queue manager.


See IBM Knowledge Center page IBM MQ 9.1.x>IBM MQ>Planning>Architectures based on multiple queue managers>Planning your distributed queues and clusters>Designing clusters>Uniform clusters>Automatic application balancing:

When there are at least as many instances of the same application as there are queue managers, the uniform cluster constantly ensures that every queue manager has at least one instance of the application connected.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2019-08-28)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。