Load Balancing/FailOver System For 2 Servers on Different Datacenters
I am using Ubuntu 12.04 and I need to implement simple/effective Load Balancer / Fail Over System as per the below requirements:
a. It should balance the load between two different public IPs (two different servers on different VPS hosting companies). I need to balance my web application (PHP, MySQL) and also my email server (Postfix, Dovecot, Spamassasin, clamAV, amavis)
b. I don’t want to use more than two servers. The project (web application+ email server) are deployed on two servers and I have only two IP addresses (IPv4).
c. I don’t want single point of failure, i.e., the load balancer/failover must work on both servers, so in case one machine is down, the second will take over.
I have seen many tutorials on how to make the balancer on servers on same subnet, but I need to make it between two servers on different datacenters.
Would you please advise if this can be done? I would greatly appreciate if you provide me with a simple tutorial or hints to do it. I am still beginner to this technology.
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.×