Differences between revisions 6 and 7
Revision 6 as of 2018-01-05 23:35:49
Size: 826
Comment:
Revision 7 as of 2018-01-08 13:02:19
Size: 914
Comment:
Deletions are marked like this. Additions are marked like this.
Line 2: Line 2:

Setup dns for the virtual ip, then setup Corosync before starting with this guide.

HA-proxy

Setup dns for the virtual ip, then setup Corosync before starting with this guide.

HA-proxy is short for High Availibility proxy. It has features to check that the servers behind it are up, and round robins incoming requests between the servers. HA-proxy can be used with various server types. We will configure two HA-proxys, which later will be running an active/passive setup with Corosync

  • 192.168.1.48 haproxy01
  • 192.168.1.49 haproxy02

Software

apt-get install haproxy

Configuration

Apache

Add the following to /etc/haproxy/haproxy.cfg

listen webfarm 
        bind www:80
        mode http
        balance roundrobin
        cookie LBN insert indirect nocache
        option httpclose
        option forwardfor
        server haproxy01 www01:80 cookie node1 check
        server haproxy02 www02:80 cookie node2 check