We have 2 loadbalancers in failover configuration, using
mod_proxy_balancer for web and haproxy for pop/imap. I
want to move to using haproxy also for the web-part, but
am a bit uncertain how to most smoothly accomplish this.

The mod_proxy_balancer is balancing over 5 backend hosts,
using a cookie the backend host sets by this apache config:

        RewriteEngine On
        RewriteRule .* - [CO=altiatmailbalance:balancer.hostX:.example.net:70]

and this is the mod_proxy_balancer config:

        ProxyStatus On
        <Proxy balancer://atmailcluster>
        BalancerMember  http://host1.example.net:80     route=host1     
loadfactor=100 retry=10
        BalancerMember  http://host2.example.net:80     route=host2     
loadfactor=100 retry=10
        BalancerMember  http://host3.example.net:80     route=host3     
loadfactor=100 retry=10
        BalancerMember  http://host4.example.net:80     route=host4     
loadfactor=100 retry=10
        BalancerMember  http://host5.example.net:80     route=host5     
loadfactor=10 retry=10
        </Proxy>
        ProxyPass /mail/ balancer://atmailcluster/mail/ lbmethod=byrequests 
stickysession=altiatmailbalance
        ProxyPassReverse /mail/ balancer://atmailcluster/mail/

So mod_proxy_balancer looks at the cookie altiatmailbalance,
and route the request to the hostname listed in after the dot
in the value (balancer.host1 goes to host1). I've no idea what 
the point of the "balancer." part is..

So, my questions: 

        o Can haproxy use the same cookie to select backend worker ? I don't
          want it to set it, just use it.

        o What's the suggested way of handling https here? Should I
          keep apache, and have it proxy everything to hapr...@localhost 
          (with hapr...@loadbalancer2 as backup), or is a stunnel from
          port 443 -> 80 a better alternativ ?


  -jf


Reply via email to