Apache 粘性会话

发布于 2024-09-19 17:14:57 字数 1358 浏览 3 评论 0原文

我已经配置了一个使用负载均衡器(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---

  1. 我将 UseJK 值更改为 true,但仍然很少有用户仍然遇到突然注销的情况,我知道这是由于满足用户请求的服务器节点发生变化所致。
  2. 我还想知道节点上的流量是否对粘性会话有任何影响以及如何应对它。(几天来我在所有服务器上都遇到了高负载)

----编辑02 ----

  1. 我也会想要了解如何控制每个工作人员的连接数。
  2. 控制 ajp 连接器/连接的数量。
  3. apache负载均衡器的连接数与连接数之间的关系 JBoss 工作节点中的 ajp 连接。
  4. 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---

  1. 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.
  2. 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 ----

  1. I would also like to know about controlling the number of connections per worker.
  2. controlling the number of ajp connector/connections.
  3. relation between the number of connections of apache load balancer and number of
    ajp connections in JBoss worker nodes.
  4. 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 技术交流群。

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

发布评论

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

评论(2

上课铃就是安魂曲 2024-09-26 17:15:05

我认为在你的worker.properties文件中,workerlist应该有loadBalancer工作器而不是node1、node2和node1、node2。 node3.它应该是这样的

worker.list=loadmanager
worker.loadmanager.balance_workers=node1,node2,node3

我希望你必须正确地掌握这些。

此外,您还必须将 UserJK arttribute 设置为 true,以实现粘性会话与 JvmRoute 结合的负载平衡。如果设置为true,则会插入一个JvmRouteFilter
拦截每个请求并在检测到故障转移时替换 JvmRoute。

<attribute name="UseJK">true</attribute>

在部署/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

worker.list=loadmanager
worker.loadmanager.balance_workers=node1,node2,node3

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.

<attribute name="UseJK">true</attribute>

in deploy/jboss-web.deployer/META-INF/jboss-service.xml

快乐很简单 2024-09-26 17:15:03

我在这篇文章中找到了以下注释有趣的是。我还没有尝试过这个,但也许对遇到同样问题的人有用。

如果您使用 mod_jk 并打开了粘性会话,但您的会话无法粘住,则可能是您未能设置域,或者未能设置 jvmRoute,或者您正在使用非标准 cookie实现粘性的名称!

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.

If you are using mod_jk and have turned sticky sessions on, but your sessions are failing to stick, you have probably failed to set the domain, or you have failed to set the jvmRoute, or you are using a non-standard cookie name to implement the stickyness!

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