Apache 粘性会话
我已经配置了一个使用负载均衡器(Apache)和三个运行 Jboss 4.2.2 的应用程序节点设置的粘性会话。 负载均衡器使用 mod_jk 和设置,如教程中所述。
http://community.jboss.org/wiki/UsingModjk12WithJBoss;jsessionid=1569CBFB7C3096C 59C977CD3F7159A32
我将三个节点的 jumRoute 设置为node1、node2 和node3,并将负载均衡器的workerlist 属性设置为 node1,node2,node3
按照教程进行到最后一点,但是我没有配置下面的useJK参数。该值仍然设置为false。 粘性会话持续存在,但我似乎失去了会话,并在 mod_jk 日志文件中收到此错误
[error] ajp_get_reply::jk_ajp_common.c (1926): (node1) 等待 tomcat 回复超时。 Tomcat down了,停止了或者网络问题(errno=110)
我亲自检查了在node1上登录的用户,然后转移到node2上。
当 Apache 无法从 node1 获得回复时,它是否会重定向到另一个节点,useJk 在这种情况下如何提供帮助。
---编辑 01---
- 我将 UseJK 值更改为 true,但仍然很少有用户仍然遇到突然注销的情况,我知道这是由于满足用户请求的服务器节点发生变化所致。
- 我还想知道节点上的流量是否对粘性会话有任何影响以及如何应对它。(几天来我在所有服务器上都遇到了高负载)
----编辑02 ----
- 我也会想要了解如何控制每个工作人员的连接数。
- 控制 ajp 连接器/连接的数量。
- apache负载均衡器的连接数与连接数之间的关系 JBoss 工作节点中的 ajp 连接。
- Apache 2.2.3 和 JBoss 4.2.2 工作节点与 Tomcat 5.5 连接器之间的最佳配置是什么。
---- 编辑03----- http://community.jboss.org/wiki/OptimalModjk12Configuration
使用我只想的上述文章了解 Apache 的最佳值 最大客户数 每个子线程数
I have configured a sticky session set up with a load balancer (Apache) and three app nodes running Jboss 4.2.2 .
the load balancer uses mod_jk and settings as mentioned in the tutorial here.
http://community.jboss.org/wiki/UsingModjk12WithJBoss;jsessionid=1569CBFB7C3096C59C977CD3F7159A32
I have the jumRoute set as node1 ,node2 and node3 for the three nodes and my workerlist property for load balancer is set as
node1,node2,node3
The tutorial has been followed till the last point but I did not configure the useJK parameters under.the value is still set to false.
The sticky sessions are holding up but I seem to loose session and get this error in my mod_jk log file
[error] ajp_get_reply::jk_ajp_common.c (1926): (node1) Timeout with waiting reply from tomcat. Tomcat is down, stopped or network problems (errno=110)
I personally checked the user logged in on node1 and then moved to node2.
Does Apache redirect to another node when it fails to get reply from node1, How does useJk help in this situation.
---edit 01---
- I changed the UseJK value to true but still few users still experience sudden log out which I know due to change in the server node catering the users request.
- I also wanted to know whether traffic on the nodes has any affect on sticky session and how to counter it.( I am experiencing high load on all the servers for a few days)
----edit 02 ----
- I would also like to know about controlling the number of connections per worker.
- controlling the number of ajp connector/connections.
- relation between the number of connections of apache load balancer and number of
ajp connections in JBoss worker nodes. - what would be the best configuration between Apache 2.2.3 and JBoss 4.2.2 worker nodes with Tomcat 5.5 connectors.
---- edit03-----
http://community.jboss.org/wiki/OptimalModjk12Configuration
using the above article i just wanted to know the best values for Apache
MaxClients
ThreadPerChild
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我认为在你的worker.properties文件中,workerlist应该有loadBalancer工作器而不是node1、node2和node1、node2。 node3.它应该是这样的
我希望你必须正确地掌握这些。
此外,您还必须将 UserJK arttribute 设置为 true,以实现粘性会话与 JvmRoute 结合的负载平衡。如果设置为true,则会插入一个JvmRouteFilter
拦截每个请求并在检测到故障转移时替换 JvmRoute。
在部署/jboss-web.deployer/META-INF/jboss-service.xml
I think in your worker.properties file the workerlist should have loadBalancer worker not the node1,node2 & node3.It should be like this
I hope u must have these correct.
Also you have to set UserJK arttribute to set as true for load balancing with sticky session combined with JvmRoute. If set to true, it will insert a JvmRouteFilter
to intercept every request and replace the JvmRoute if it detects a failover.
in deploy/jboss-web.deployer/META-INF/jboss-service.xml
我在这篇文章中找到了以下注释有趣的是。我还没有尝试过这个,但也许对遇到同样问题的人有用。
I found the following note in this article interesting. I haven't tried this, but perhaps could be useful for someone experiencing the same problem.