I managed to get HAproxy working in a failover configuration as suggested on the architecture.txt document using keepalived.

I used CentOS 5.5, HAproxy rpm (haproxy-1.3.25-1.el5) from epel repo, and keepalived rpm (keepalived-1.1.15-0.el5.centos) from CentOS testing repo.

This is my keepalived configuration

vrrp_script chk_haproxy {           # Requires keepalived-1.1.13
    script "killall -0 haproxy"     # cheaper than pidof
    interval 2                      # check every 2 seconds
    weight 2                        # add 2 points of prio if OK
}

vrrp_instance VI_1 {
    interface eth0
    state MASTER
    virtual_router_id 51
    priority 101                    # 101 on master, 100 on backup
    virtual_ipaddress {
    10.0.0.30            
    10.0.0.31            
    }
    track_script {
        chk_haproxy
    }
}

What I would like now is having my backup node being able to take over the actual connections open when the master is failing.

I heard this can be done in multiple ways (conntrackd), using LVS features, etc... I'd like to have suggestions on the simplest and more robust way to achieve it, using available rpms would be best.

Thanks G

link|improve this question

57% accept rate
feedback

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
or
required, but never shown

Browse other questions tagged or ask your own question.