
9th September 2008, 18:52
|
|
Senior Member
|
|
Join Date: May 2007
Posts: 189
Thanks: 11
Thanked 2 Times in 2 Posts
|
|
High-Availability Load Balancer setup
I'm looking into setting up something like what's in the article "Setting Up A High-Availability Load Balancer (With Failover and Session Support) With HAProxy/Heartbeat On Debian Etch" ( http://www.howtoforge.com/high-avail...at-debian-etch), except I'm using the latest Ubuntu server. I have two identical physical servers running behind a monowall firewall/router. I also have the local network going through the same router, and then to a wireless router.
I've read all the articles about load balancing, and failover, and I want to set up mine better that what I'm doing now, which is just cron jobs mirroring my Mysql, web files, etc., from my primary to the secondary server.
My problem is that I don't understand how to physically set up a system to do like what's in the above article. I can't seem to figure out things like, where do I actually install the load balancers? Do I need more NIC's to connect the two computers? Do I actually need two more physical systems to make it work? I guess what I needed to find was a diagram showing the physical systems, what's installed in the, and how they're connected.
Sorry if I'm sounding clueless. It took me a while to work up the courage to actually ask this. Thanks.
|

10th September 2008, 17:43
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,665
Thanks: 1,896
Thanked 2,593 Times in 2,444 Posts
|
|
In the tutorial you have four (physical or virtual) systems: two load balancers and two web servers. The virtual IP is floating between the load balancers (they are in an active-passive configuration, i.e. the active load balancer holds the virtual IP). The requests go to the active load balancer which then passes them on to the web servers.
The load balancers work fine with just one NIC.
|

11th September 2008, 04:14
|
|
Senior Member
|
|
Join Date: May 2007
Posts: 189
Thanks: 11
Thanked 2 Times in 2 Posts
|
|
Thanks Falko. I'm sorry, but I still seem to be missing something.
I have two PC's, with a single NIC in each of them. they in turn are connected to the WAN through a network switch, then my router/firewall. The router has four NIC's, three are being used now for the current setup (WAN, LAN, servers). I have a public IP that's NATed to internal IPs.
If I'm picturing the setup in your tutorial correctly, I can install the load balancers on the same PC's as the server's are now? Then follow the setup to have the LB send the traffic on to the two servers. If that's correct, then are the LB's installed on a virtual system? Do I still need backup systems, or is it correct that the LB will distribute all the files to both servers?
I really am sorry that I'm having such a blind spot in figuring this out. I just want the best way of doing this, and hopefully not having to buy another computer.
Last edited by wxman; 12th September 2008 at 14:39.
|

12th September 2008, 16:56
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,665
Thanks: 1,896
Thanked 2,593 Times in 2,444 Posts
|
|
You can install the load balancers and the servers in virtual machines, so you end up with four virtual machines; each physical server holds one load balancer vm and one web server vm.
The load balancers have one virtual IP address (it's a private IP from your LAN), and you configure your router to forward requests to that virtual IP.
The active load balancer distributes the requests to both web servers. if one web server fails, the active load balancer notices this and forwards all requests to the remaining web server.
|

12th September 2008, 17:49
|
|
Senior Member
|
|
Join Date: May 2007
Posts: 189
Thanks: 11
Thanked 2 Times in 2 Posts
|
|
I think I get it now.
Can I still use the two servers as my two name servers. Right now my two physical servers are running Bind, and I have them configured to be NS1 and NS2?
|

13th September 2008, 11:14
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,665
Thanks: 1,896
Thanked 2,593 Times in 2,444 Posts
|
|
Yes, that's no problem.
|
|
The Following User Says Thank You to falko For This Useful Post:
|
wxman (13th September 2008)
|

13th September 2008, 18:08
|
|
Senior Member
|
|
Join Date: May 2007
Posts: 189
Thanks: 11
Thanked 2 Times in 2 Posts
|
|
Thanks Falko. As usual you've been a big help.
|

4th April 2009, 22:51
|
|
Senior Member
|
|
Join Date: May 2007
Posts: 189
Thanks: 11
Thanked 2 Times in 2 Posts
|
|
I know this is an old thread by now, but I had another question that fit here.
If I did the setup described above, and needed primary and secondary nameservers, do I install Bind in the same vm as each of the webservers, or in their own 5th and 6th vm's? If that's the way to do it, does Bind care when one goes down?
|

5th April 2009, 15:11
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,665
Thanks: 1,896
Thanked 2,593 Times in 2,444 Posts
|
|
Quote:
Originally Posted by wxman
do I install Bind in the same vm as each of the webservers, or in their own 5th and 6th vm's?
|
Doesn't matter.
Quote:
Originally Posted by wxman
If that's the way to do it, does Bind care when one goes down?
|
That's why you need at least two nameservers, so that name resolution works even if one nameserver is down.
|

5th April 2009, 15:29
|
|
Senior Member
|
|
Join Date: May 2007
Posts: 189
Thanks: 11
Thanked 2 Times in 2 Posts
|
|
In your opinion/experience, do you think that this system works better than a manual one I'm using now?
Right now I have two physical servers set up behind the firewall/router using ISPConfig on both to manage sites. I have the DB, and all the site files, mirrored to the second server. Bind uses uses server 1 as master and server 2 as slave. My plan, in theory, is if server 1 goes down, I switch the IP address in the router pointing to the second server, making it the primary while I fix server 1. I realize that having an automated system sound safer, but I already have it set up like this now. I'm not using the servers in production yet, and I've been debating if I ought to tear it all down, and go with the HA load balancing, and failover before we start using it for real.
Maybe a stupid sounding question; when editing or adding new web sites, do you only do that on one of the virtual servers? So all you need to do to add a new site is use ISPConfig to set it up, and it sets everything, including any Mysql db's, emails, etc, on the other virtual server?
Last edited by wxman; 5th April 2009 at 16:30.
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT +2. The time now is 22:12.
|
|
Recent comments
16 hours 24 min ago
23 hours 5 min ago
1 day 2 hours ago
1 day 4 hours ago
1 day 13 hours ago
1 day 22 hours ago
1 day 23 hours ago
2 days 2 hours ago
2 days 7 hours ago
2 days 7 hours ago