首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >apache http服务器负载均衡器监视

apache http服务器负载均衡器监视
EN

Stack Overflow用户
提问于 2014-03-25 11:59:40
回答 2查看 2.4K关注 0票数 0

我将apache http服务器配置为使用mod-代理模块充当负载均衡器。

代码语言:javascript
复制
<Proxy balancer://clusterABCD>
    BalancerMember http://192.168.0.222:8080/geoserver/wms loadfactor=8
    BalancerMember http://192.168.0.14:8081/geoserver/wms loadfactor=8
    BalancerMember http://192.168.0.222:8082/geoserver/wms status=+H
    ProxySet lbmethod=bytraffic
    Order allow,deny
    Allow from all
</Proxy>

ProxyPass /LGroup balancer://clusterABCD/

有什么方法可以监视负载平衡器的功能吗?

我的问题是

  1. 有什么方法可以找到请求从哪个BalanceMember中处理?
  2. 是否有任何可用于增加功能的设置?

预先谢谢

EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2015-07-13 23:54:09

为了回答您的两个问题,这是可能的,但您需要通过Mod代理增强Apache负载平衡的配置,以使此功能可用。

我建议您使用下面的示例设置:

代码语言:javascript
复制
<VirtualHost *:80>
ProxyRequests off

ServerName servername.local

<Proxy balancer://mycluster>
        # TomcatA
        BalancerMember http://172.20.20.101:8080 route=tomcatA
        # TomcatB
        BalancerMember http://172.20.20.102:8080 route=tomcatB
        # TomcatC
        BalancerMember http://172.20.20.103:8080 route=tomcatC


        # Security – to determine who is allowed to access
        # Currently all are allowed to access
        Order Deny,Allow
        Deny from none
        Allow from all

        # Load Balancer Settings
        # We will be configuring a simple Round
        # Robin style load balancer.  This means
        # that all nodes take an equal share of
        # of the load.
        ProxySet lbmethod=byrequests

</Proxy>

# balancer-manager
# This tool is built into the mod_proxy_balancer
# module and will allow you to do some simple
# modifications to the balanced group via a gui
# web interface.
<Location /balancer-manager>
        SetHandler balancer-manager

        # I recommend locking this one down to your
        # administering location
        Order deny,allow
        Allow from all
</Location>

# Point of Balance
# This setting will allow to explicitly name the
# location in the site that we want to be
# balanced, in this example we will balance "/"
# or everything in the site.
ProxyPass /balancer-manager !
ProxyPass / balancer://mycluster/ stickysession=JSESSIONID|jsessionid nofailover=Off scolonpathdelim=On

要查看余额请求,需要有模块

mod_proxy_balancer

安装,然后使用上面的配置。

关于可用性,它取决于负载均衡器设置- Round方法-在节点之间平等地共享通信量,并且被认为可能是可用性的最佳选择:

ProxySet lbmethod=byrequests

另外,如果您正在考虑将会话从Apache共享到app服务器,则需要配置AJP而不是HTTP端口,以及应用程序服务器(如Tomcat)上所需的更改。详情可在以下网址查阅:

负载平衡: Apache与物理设备

票数 0
EN

Stack Overflow用户

发布于 2014-11-26 10:21:37

可能太简单了,但是监视平衡器成员的(访问)日志又如何呢?这应该会告诉您,哪个成员正在处理请求。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/22633953

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档