[英]Disable stickyness on apache mod_proxy_balancer
I want to configure Apache Web Server to meet the following requirement: 我想配置Apache Web Server以满足以下要求:
To do so, i tried configuring Apache Web Server (2.2) using mod_proxy_balancer. 为此,我尝试使用mod_proxy_balancer配置Apache Web Server(2.2)。 My problem is that session stickyness seems to be enabled by default. 我的问题是默认情况下会启用会话粘性。 When server1 is not responding, the balancer redirects to server2, but when server1 recovers, the balancer does not access server1 until i clear sessions in my browser. 当server1没有响应时,平衡器会重定向到server2,但是当server1恢复时,在我清除浏览器中的会话之前,平衡器不会访问server1。
My balancer configuration: 我的平衡器配置:
ProxyPass /test balancer://mycluster
<Proxy balancer://mycluster>
BalancerMember server1-url retry=10 loadfactor=100
BalancerMember server2-url status=+H retry=10
</Proxy>
Is there any option to disable stickyness? 有没有选项可以禁用粘性?
Thanks in advance. 提前致谢。
You can do this with Mod_JK with below properties. 您可以使用具有以下属性的Mod_JK执行此操作。 Reference configuration can be found at Apache httpd 2.2.x + mod_jk 1.2.30 + tomcat 6 Error: Could not find worker with name 'XXXXX' in uri map post processing 参考配置可以在Apache httpd 2.2.x + mod_jk 1.2.30 + tomcat 6找到错误:在uri map post处理中找不到名为'XXXXX'的worker
# Disable Sticky Session
worker.loadbalancer.sticky_session=0
# Define preferred failover node for worker1
worker.worker1.redirect=worker2
# Disable worker2 for all requests except failover
worker.worker2.activation=disabled
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.