LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 01-30-2007, 09:04 AM   #1
tanveer
Member
 
Registered: Feb 2004
Location: e@rth
Distribution: RHEL-3/4/5,Gloria,opensolaris
Posts: 525

Rep: Reputation: 39
Linux HA and Load balancing


Hi all:
I need some help on Linux clustering issue that is I want to build a High available and load balancing clustering solution in RHEL4. I am now going through linux-ha.org site which is currently making little sense to me as I m lost. Currently these I make out of clustering issue
To make the HA cluster
Say I am using 2 Nodes (Can I use more than 2 nodes?) one master and one slave with 2 NICs on both of them.

These are the softwares that are required:
1.heartbeat-pils-1.0.4-1.i386.rpm
2.heartbeat-stonith-1.0.4-1.i386.rpm
3.heartbeat-1.0.4-1.i386.rpm

Master node Configuration:
Code:
# ifconfig
eth0  
inet addr:192.168.85.1  Bcast:192.168.1.255   Mask:255.255.255.0

(Why create a virtual interface as in this link 
http://linux-ha.org/GettingStarted#gettingstarted they didn't created any? )       

eth0:0  
inet addr:192.168.85.3  Bcast:192.168.1.255  Mask:255.255.255.0

eth1    
inet addr:10.0.0.1  Bcast:10.255.255.255  Mask:255.0.0.0        

lo      inet addr:127.0.0.1  Mask:255.0.0.0

In slave Node:

Code:
eth0
inet addr:192.168.85.2  Bcast:192.168.1.255  Mask:255.255.255.0
    
eth1
 inet addr:10.0.0.2  Bcast:10.255.255.255  Mask:255.0.0.0

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
Is there any need to configure any virtual interface in slave?

Next configured /etc/hosts in both servers
Code:
127.0.0.1	localhost.localdomain 	localhost
192.168.85.1    masternode
192.168.85.2    slavenode
Configure file /etc/ha.d/authkeys
Code:
auth 1
1 CRC
Configure File /etc/ha.d/haresources
Code:
masternode   IPaddr::192.168.85.3  smb httpd
Where masternode is a hostname of master server and 192.168.1.51 is a virtual IP which is requested by client and httpd is monitor service.


Configuring following parameters in /etc/ha.d/ha.cf
Code:
debugfile /var/log/ha-debug
logfile	/var/log/ha-log
logfacility	local0
keepalive 1	
deadtime 5
warntime 3
initdead 10
udpport	694
bcast	eth0		# Linux
node	masternode
node	slavenode
Now how its actually swapping between these two nodes based on that virtual interface and how to make the load balancing ?

Thanks in advance and going through this.
 
Old 02-01-2007, 08:19 AM   #2
subzero_ice
LQ Newbie
 
Registered: Apr 2004
Distribution: Gentoo, Slackware
Posts: 8

Rep: Reputation: 0
You need to enter a password in authfile and it should have permissions 600.
auth 1
1 CRC PASSWORD_HERE

What is does is consistently ping the master server to check if the server is still running. If it detects a failure then it brings up the virtual interface.

If uses the IPaddr script. It is located under /etc/ha.d/resources

I would also advise that you add a ping host. So that it can check network connectivity based on a third host too.
 
Old 02-01-2007, 07:08 PM   #3
tanveer
Member
 
Registered: Feb 2004
Location: e@rth
Distribution: RHEL-3/4/5,Gloria,opensolaris
Posts: 525

Original Poster
Rep: Reputation: 39
Thank you for your reply.
Can I use more than 2 nodes for failover and how to do load balancing? Should I use another 2 nodes for load balancing that is in total of 4 nodes for load balancing and HA.

Any tutorial where I can get a good tutorial on setting up load balancing server on RHEL4.
 
Old 02-02-2007, 12:19 AM   #4
subzero_ice
LQ Newbie
 
Registered: Apr 2004
Distribution: Gentoo, Slackware
Posts: 8

Rep: Reputation: 0
you can use more than 2 nodes. I haven't. I am in the process of deploying a 2 node load balancer one being the hot standby.

Here is a link to the tutorial.
http://www.austintek.com/LVS/LVS-HOWTO/HOWTO/index.html

Not sure if RHEL includes the required packages. What kind of configuration are you looking at active-active?
 
Old 02-02-2007, 05:02 AM   #5
tanveer
Member
 
Registered: Feb 2004
Location: e@rth
Distribution: RHEL-3/4/5,Gloria,opensolaris
Posts: 525

Original Poster
Rep: Reputation: 39
Thanks for your reply.
I am now going through the link u gave and its huge.
I found a tutorial here
http://howtoforge.com/high_availabil...apache_cluster
and this is exactly what I am looking for, except that, the author used Debian Sarge for it and I will be using RHEL ES4.
My target is now to make it happen with 2 nodes first then I will go for more.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
load balancing? linux router? Kabul Linux - Networking 4 09-06-2006 12:47 AM
Bonding/Load Balancing With Linux... caps_phisto Linux - Networking 3 08-24-2006 09:20 AM
Load Balancing In Linux? depam Linux - Software 9 07-08-2006 01:40 PM
Setting Up a linux router - with load balancing ? yahooadam Linux - Networking 5 01-30-2006 09:37 AM
Load Balancing Linux Router Setup remigus Linux - Networking 2 12-02-2002 09:28 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 03:18 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration