apache负载平衡器可以find它的一个平衡器成员是否closures?

我需要知道apache是​​否可以明智地自动检测到它的一个balanerMembers是否closures,从而免除了服务请求?

PS后端服务器不会产生心跳。

谢谢

评论:我在apache 2.4.7中使用mod_proxy我的configuration示例站点如下所示,我的问题是当其中一个后端服务器无响应,我的负载平衡器仍然发送请求到死的后端服务器和客户抱怨。 下面的configuration有什么问题:

<Proxy balancer://X_Balancer> BalancerMember http://firsthost.sth/ status=-SE BalancerMember http://anotherhost.sth/ status=-SE ProxySet lbmethod=bybusyness </Proxy> <VirtualHost IPofloadbalancer:80> ServerName domainname SSLProxyEngine On Include /*/modsecurity.conf <location /> ProxyPass balancer://X_Balancer/ ProxyPassReverse balancer://X_Balancer/ </location> </VirtualHost> 

如果在Apache 2.2中使用mod_proxy ,则只能使用有限的configuration选项,但Apache将检测到无响应的balancerMembers并将请求分发给任何其余的balancerMembers。

Apache 2.4已经有了更多的select,但是对于更高级的选项,使用更专业的负载均衡器软件通常会更好。

您的意见后:这取决于balancerMember如何停止响应。 如果仍然可以build立连接,但没有错误代码并且没有响应即将到来,则可以通过设置timeoutfailontimeout选项来获益。

 <Proxy balancer://X_Balancer> BalancerMember http://firsthost.sth/ status=-SE timeout=5 retry=60 BalancerMember http://anotherhost.sth/ status=-SE timeout=5 retry=60 ProxySet lbmethod=bybusyness failontimeout=on </Proxy> 

timeout=5以秒为单位的连接超时。 Apache httpd等待由/发送到后端的数据的秒数。
failontimeout=on如果设置,请求发送到后端后的IO读取超时将强制工作人员进入错误状态。 工作人员恢复行为与其他工作人员错误相同。

BalancerMember http://firsthost.sth/connectiontimeout = 5重试= 5 ping = 2
BalancerMember http://anotherhost.sth/connectiontimeout = 5重试= 5 ping = 2

尝试在上面的方向! 查看对ajp协议的更改。