禁止在Apache mod_proxy_balancer的stickyness [英] Disable stickyness on apache mod_proxy_balancer

查看:150
本文介绍了禁止在Apache mod_proxy_balancer的stickyness的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想配置Apache Web服务器必须满足以下要求:

I want to configure Apache Web Server to meet the following requirement:


  • 访问server1的,而它的工作。

  • 只有当Server1上没有响应访问服务器2。当Server1的响应,获得server1的一次。

要做到这一点,我尝试使用mod_proxy_balancer的配置Apache Web服务器(2.2)。我的问题是会议stickyness似乎是默认启用。当Server1是没有响应,平衡器重定向到服务器2,但是当Server1的复苏,平衡器不访问服务器1,直到我的浏览器我清晰的会话。

To do so, i tried configuring Apache Web Server (2.2) using mod_proxy_balancer. 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.

我的平衡器配置:

ProxyPass /test balancer://mycluster
<Proxy balancer://mycluster>
    BalancerMember server1-url retry=10 loadfactor=100
    BalancerMember server2-url status=+H retry=10
</Proxy>

是否有任何选项来禁用stickyness?

Is there any option to disable stickyness?

先谢谢了。

推荐答案

您可以用MOD_JK下面的属性做到这一点。参考配置可以在<一个找到href=\"http://stackoverflow.com/questions/3666649/apache-httpd-2-2-x-mod-jk-1-2-30-tomcat-6-error-could-not-find-worker-with\">Apache httpd的是2.2.x + mod_jk的1.2.30 + tomcat的6错误:找不到在URI地图后处理名称'XXXXX'工人

You can do this with Mod_JK with below properties. 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

# 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

这篇关于禁止在Apache mod_proxy_balancer的stickyness的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆