Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > HOWTO-Related Questions

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 9th September 2008, 19:52
wxman wxman is offline
Senior Member
 
Join Date: May 2007
Posts: 189
Thanks: 11
Thanked 2 Times in 2 Posts
Default 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.
Reply With Quote
Sponsored Links
  #2  
Old 10th September 2008, 18:43
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,745 Times in 2,578 Posts
Default

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.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 11th September 2008, 05:14
wxman wxman is offline
Senior Member
 
Join Date: May 2007
Posts: 189
Thanks: 11
Thanked 2 Times in 2 Posts
Default

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 15:39.
Reply With Quote
  #4  
Old 12th September 2008, 17:56
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,745 Times in 2,578 Posts
Default

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.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #5  
Old 12th September 2008, 18:49
wxman wxman is offline
Senior Member
 
Join Date: May 2007
Posts: 189
Thanks: 11
Thanked 2 Times in 2 Posts
Default

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?
Reply With Quote
  #6  
Old 13th September 2008, 12:14
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,745 Times in 2,578 Posts
Default

Yes, that's no problem.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
The Following User Says Thank You to falko For This Useful Post:
wxman (13th September 2008)
  #7  
Old 13th September 2008, 19:08
wxman wxman is offline
Senior Member
 
Join Date: May 2007
Posts: 189
Thanks: 11
Thanked 2 Times in 2 Posts
Default

Thanks Falko. As usual you've been a big help.
Reply With Quote
  #8  
Old 4th April 2009, 23:51
wxman wxman is offline
Senior Member
 
Join Date: May 2007
Posts: 189
Thanks: 11
Thanked 2 Times in 2 Posts
Default

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?
Reply With Quote
  #9  
Old 5th April 2009, 16:11
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,745 Times in 2,578 Posts
Default

Quote:
Originally Posted by wxman View Post
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 View Post
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.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #10  
Old 5th April 2009, 16:29
wxman wxman is offline
Senior Member
 
Join Date: May 2007
Posts: 189
Thanks: 11
Thanked 2 Times in 2 Posts
 
Default

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 17:30.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
High Availability (Load Balancing) behind a firewall geek.de.nz Server Operation 7 4th January 2011 14:58
ISPConfig + load balancer xtype2 General 4 3rd December 2008 19:08
Public and private network + High Availability Apache Cluster teleted HOWTO-Related Questions 11 28th January 2008 15:29
Copying big files = high server load? edge Server Operation 3 27th April 2007 20:37
Howto suggestion suse PhP ver 4 + Ver 5 wwparrish Suggest HOWTO 11 7th August 2006 14:29


All times are GMT +2. The time now is 16:58.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.