Search code examples
nginxload-balancinghaproxy

Load Balancer HA


what happens when a load balancer (HaProxy / Nginx) is down, this single point of failure may cause the whole system to be unavailable, what's the best strategy to recover in this case; how to prevent service to be unavailable.

Do we also need replication for Loadbalancer to prevent data loss?


Solution

  • The common solution is to run one or several servers with one or more VIPs (Virtual IP address) where the keepalived handle the VIP and haproxy the load.

    This is one of many examples how to create such a setup Setting Up A High-Availability Load Balancer (With Failover And Session Support) With HAProxy/Keepalived On Debian Lenny

    About the "replication" should you answer to you these questions.

    • what do you want to replicate?
    • how many replications do you want?

    In HAProxy can you use Peers for replication of several things.