https://issues.apache.org/bugzilla/show_bug.cgi?id=56312

            Bug ID: 56312
           Summary: Can't configure different balancing workers that
                    contain the same balancer url
           Product: Apache httpd-2
           Version: 2.2.22
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: mod_proxy_balancer
          Assignee: [email protected]
          Reporter: [email protected]

Let's take an example config that configures 3 different balancer workers named
cluster_100, cluster_200, cluster_300 that each have a different timeout of
100s, 200s and 300s. Now we want to ProxyPass specific application paths to
those configured workers as we know that those different applications need
different timeout values to handle requests properly e.g. /ajax/test_200 needs
up to 200s to write a response to a request so we map it to
balancer://cluster_200/ajax/test_200.

<IfModule mod_proxy_http.c>
  ProxyRequests Off
  ProxyStatus On
  ProxyPreserveHost On

  <IfModule mod_status.c>
    <Location /balancer-manager>
      SetHandler balancer-manager
      Order Allow,Deny
      Allow from all
    </Location>
  </IfModule>

  # Define default Proxy container
  <Proxy balancer://cluster_100>
      Order deny,allow
      Allow from all
      BalancerMember http://127.0.0.1:8009 timeout=100 smax=0 ttl=60 retry=0
loadfactor=50 keepalive=On route=member1
      #BalancerMember http://your_additional_member:8009 timeout=100 smax=0
ttl=60 retry=0 loadfactor=50 keepalive=On route=member2
      ProxySet stickysession=JSESSIONID|jsessionid scolonpathdelim=On
      SetEnv proxy-initial-not-pooled
      SetEnv proxy-sendchunked
  </Proxy>

  <Proxy balancer://cluster_200>
      Order deny,allow
      Allow from all
      BalancerMember http://127.0.0.1:8009 timeout=200 smax=0 ttl=60 retry=0
loadfactor=50 keepalive=On route=member1
      #BalancerMember http://your_additional_member:8009 timeout=200 smax=0
ttl=60 retry=0 loadfactor=50 keepalive=On route=member2
      ProxySet stickysession=JSESSIONID|jsessionid scolonpathdelim=On
      SetEnv proxy-initial-not-pooled
      SetEnv proxy-sendchunked
  </Proxy>

  <Proxy balancer://cluster_300>
      Order deny,allow
      Allow from all
      BalancerMember http://127.0.0.1:8009 timeout=300 smax=0 ttl=60 retry=0
loadfactor=50 keepalive=On route=member1
      #BalancerMember http://your_additional_member:8009 timeout=300 smax=0
ttl=60 retry=0 loadfactor=50 keepalive=On route=member2
      ProxySet stickysession=JSESSIONID|jsessionid scolonpathdelim=On
      SetEnv proxy-initial-not-pooled
      SetEnv proxy-sendchunked
  </Proxy>

  ProxyPass /ajax/test_100        balancer://cluster_100/ajax/test_100
  ProxyPass /ajax/test_200        balancer://cluster_200/ajax/test_200
  ProxyPass /ajax/test_300        balancer://cluster_300/ajax/test_300
  ProxyPass /ajax                 balancer://cluster_100/ajax
  ProxyPass /servlet              balancer://cluster_100/servlet

</IfModule>

All of this works as expected in 2.4.6.

Testing this with 2.2.16 (debian squeeze) or 2.2.22 (debian wheezy) though
fails as requests to /ajax/test_200 which need 200s or to /ajax/test_300 which
need 300s to return a result are terminated after 100s, the timeout configured
for balancer://cluster_100.


Raising the LogLevel to debug informs us about the following:
 service apache2 restart
[....] Restarting web server: apache2[Tue Mar 25 17:18:30 2014] [info] worker
http://192.168.32.50:8009 already used by another worker
[Tue Mar 25 17:18:30 2014] [info] worker http://192.168.32.50:8009 already used
by another worker
 ... waiting [Tue Mar 25 17:18:31 2014] [info] worker http://192.168.32.50:8009
already used by another worker
[Tue Mar 25 17:18:31 2014] [info] worker http://192.168.32.50:8009 already used
by another worker
. ok

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to