Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Server Operation

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 22nd November 2006, 20:59
cracker54 cracker54 is offline
Junior Member
 
Join Date: Nov 2006
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Exclamation Ldirectord and heartbeat with multiple IPs

So I have a question about heartbeat and ldirectord. This may be a simple question, but I don't know the exact answer so if I could get some help with this it would be greatly appreciated.

I am working on a project that has the following servers:

2 Linux directors each running ldirectord and heartbeat
3 web servers which are being load balanced via the Linux directors
Multiple other servers that the client has running for their business

There are 8 public or “virtual” IPs all used to get to various web pages, servers and services.
We will say the IPs range from 210.0.0.1 to 210.0.0.9 with netmask of 255.255.255.0
Internally they are running a standard 192.168.X.X network.

We are running a High Capacity High Availability and Load Balancing model for the setup using ldirectord and heartbeat. The picture below is a general setup



Anyways now down to the real question.

I am wondering if there is anything special we need to do with the /etc/ha.d/haresources file to accommodate for all the extra IPs. Or does the /etc/ha.d/ldirectord.cf file take care of the “virtual” IPs?

This is what the /etc/ha.d/haresources and the /etc/ha.d/ha.cf files currently look like.

/etc/ha.d/ha.cf

logfacility local0
bcast eth0 # Linux
mcast eth0 225.0.0.1 694 1 0
auto_failback off
node LoadBalancer1
node LoadBalancer2
respawn hacluster /usr/lib/heartbeat/ipfail
apiauth ipfail gid=haclient uid=hacluster


/etc/ha.d/haresources

LoadBalancer1 \
ldirectord::ldirectord.cf \
LVSSyncDaemonSwap::master \
IPaddr2::210.0.0.1/24/eth0/210.0.0.255


What I am unsure of is if we need to add more IPs to the /etc/ha.d/haresources file since the client wants to be able to get to all of their servers via a public IP being routed through the linux directors.... PLEASE HELP!
Reply With Quote
Sponsored Links
  #2  
Old 23rd November 2006, 17:00
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,727 Times in 2,565 Posts
Default

The ha* files are for heartbeat so that each load balancer can see if the others are still up. It's ldirector that handles the virtual IP addresses.
__________________
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 23rd November 2006, 21:57
cracker54 cracker54 is offline
Junior Member
 
Join Date: Nov 2006
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Okay then another quick question. Does it matter if the IP you enter into for the /etv/ha.d/haresources is a public IP or should it be kept a private IP? I know that sounds like a stupid question.
Reply With Quote
  #4  
Old 24th November 2006, 16:40
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,727 Times in 2,565 Posts
Default

That depends on your network setup. Ideally you have some kind of local network where you can decide yourself which IP addresses to use. In this tutorial: http://www.howtoforge.com/high_avail...apache_cluster I use private IP addresses. If you have your servers in some data center, it might be problematic telling your ISP that you need a virtual public IP address.
__________________
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 30th November 2006, 00:00
cracker54 cracker54 is offline
Junior Member
 
Join Date: Nov 2006
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

This is fine if you only have on webpage. It does not address the problem of you having multiple webpages and IPs running through a router.
Reply With Quote
  #6  
Old 30th November 2006, 16:31
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,727 Times in 2,565 Posts
 
Default

I think you can have multiple web sites if you use name-based vhosts: http://httpd.apache.org/docs/2.0/vhosts/name-based.html
__________________
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
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 Availabilty with heartbeat and ldirectord tate_harmann Server Operation 16 25th March 2009 16:32


All times are GMT +2. The time now is 06:08.


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