mod_proxy_balancer re-orders my backend servers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all

[ Apache 2.2, event MPM, FreeBSD 6.2 ]

I have two vhosts using mod_proxy_balancer to provide hot standby
replicas for our service, each in a different data centre, allowing us
to completely lose one data centre and still provide a service to our
customers.
Each balancer cluster is configured with one main server and one hot
standby. Anonymized configuration at the end.

The problem is that every now and again, it is reversing which server is
the hot backup and which is the current live. As you can see quite
clearly from the conf file, the hot standby is app04.london.ad, and all
requests should be going to app05.lon-dc.ad.
Indeed, this is exactly how it behaves after a hard stop-start cycle,
and will continue like that for a while, until, mythically, magically,
it switches which host is the hot standby. 
The balancer admin interface gives no capability to change the hot
standby status of a balancer member, and does not revert to the config
as specified in the conf file without a full restart (graceful does not
fix it), so the only way to resolve this after it has happened is to
disable app04 (the server which should be the hot standby, but has been
promoted to live). 
It is a bit worse than I've indicated here, as there are actually two
front end proxies round-robinning requests, and each one will exhibit
the problem at different times, so one server may be proxying to one
place, and one server to another. There are also two vhosts with similar
clusters, which should be in sync with each other, and obviously in this
case, very quickly they are not!

Any ideas? I'm considering dropping all automatic failover, and make it
necessary to edit the conf file and restart the server to make this
reliable and predictable, which is clearly suboptimal!

Cheers

Tom

Config file:

<VirtualHost *>
  ServerName services.lon-dc.ad
  DocumentRoot "/var/empty"

  <Directory "/var/empty">
    AllowOverride none
    Order allow,deny
    Allow from all
  </Directory>

  <IfModule proxy_module>
    ProxyRequests Off
    ProxyPreserveHost on
    SetEnv proxy-nokeepalive 1

    <Proxy balancer://cluster>
      BalancerMember http://app05.lon-dc.ad
      BalancerMember http://app04.london.ad status=+H 
    </Proxy>

    ProxyPass /balancer !
    ProxyPass /internal/ balancer://cluster/internal/
    ProxyPassReverse /internal/ http://app04.london.ad/internal/
    ProxyPassReverse /internal/ http://app05.lon-dc.ad/internal/
    ProxyPassReverseCookieDomain app04.london.ad services.lon-dc.ad
    ProxyPassReverseCookieDomain app05.lon-dc.ad services.lon-dc.ad

    <Location /balancer>
      SetHandler balancer-manager
    </Location>
  </IfModule>
</VirtualHost>



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux