LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Linux HA and Load balancing (https://www.linuxquestions.org/questions/linux-networking-3/linux-ha-and-load-balancing-524056/)

tanveer 01-30-2007 09:04 AM

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.

subzero_ice 02-01-2007 08:19 AM

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.

tanveer 02-01-2007 07:08 PM

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.

subzero_ice 02-02-2007 12:19 AM

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?

tanveer 02-02-2007 05:02 AM

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.


All times are GMT -5. The time now is 08:20 AM.