LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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 07-17-2003, 09:12 AM   #1
youngclusterman
LQ Newbie
 
Registered: Jul 2003
Posts: 7

Rep: Reputation: 0
3 node Apache WebServer Linux Cluster


Say that 5 times fast... I dare ya..

My cluster is set up like so:

...............................{Internet}
.......................................|
.......................................|
...........................Master Node
.......................................|
....................................Hub
................................../.........\
................................/.............\
.......................Slave1.........Slave2

Setup: All three have RedHat Linux 9.0
RSH between Master and Slave1/Slave2
All three have Apache 1.3 WebServers


My problem:
Getting an Apache 1.3 WebServer to Load Balance between the 3 machines. When the user connects to the website (vvww.test.com) it shows up as what the MasterNode has on its server. Then when user2 comes to vvww.test.com it shows what Slave1 has on its server. Same for user3 and then It will all start back at MasterNode's web server for user4.

For anyone who is paying attention:
This was "poorly" answered before (when I say poorly I mean not at all) I have searched far and wide for a solution to my problem. If someone has tried this before or knows the solution to my problem, please feel free to help me out.

Thank you for your time,
Young Cluster Man

Last edited by youngclusterman; 07-17-2003 at 10:10 AM.
 
Old 07-17-2003, 10:55 AM   #2
youngclusterman
LQ Newbie
 
Registered: Jul 2003
Posts: 7

Original Poster
Rep: Reputation: 0
bump
 
Old 07-17-2003, 11:12 AM   #3
pnh73
Member
 
Registered: Jul 2003
Location: Birmingham, UK
Distribution: Ubuntu,Debian
Posts: 381

Rep: Reputation: 30
"When the user connects to the website (vvww.test.com) it shows up as what the MasterNode has on its server. Then when user2 comes to vvww.test.com it shows what Slave1 has on its server. Same for user3 and then It will all start back at MasterNode's web server for user4. "

Is that what you want it to do or what it does do?
 
Old 07-17-2003, 11:23 AM   #4
Capt_Caveman
Senior Member
 
Registered: Mar 2003
Distribution: Fedora
Posts: 3,658

Rep: Reputation: 69
Sounds like you're looking for a "round-robin" load balancer. Do a search at www.freshmeat.net for "load balancers". I did a quick search and turned up a couple of projects that do everything from generic TCP balancing to specific web balancers. Hopefully you can find something that does the job.
 
Old 07-17-2003, 11:28 AM   #5
youngclusterman
LQ Newbie
 
Registered: Jul 2003
Posts: 7

Original Poster
Rep: Reputation: 0
phn73: It's what I want it to do.

Capt_Caveman: I am trying to do this without a load balancer, is that possible?

I was thinking there was a way to edit /etc/httpd/conf/httpd.conf in some way to make this happen without an extra program.
 
Old 07-17-2003, 12:22 PM   #6
youngclusterman
LQ Newbie
 
Registered: Jul 2003
Posts: 7

Original Poster
Rep: Reputation: 0
Would Port Forwarding work for this? And if so how would I go about doing that?
 
Old 07-17-2003, 01:47 PM   #7
youngclusterman
LQ Newbie
 
Registered: Jul 2003
Posts: 7

Original Poster
Rep: Reputation: 0
Alright, just thought of something that might help someone understand what I'm really trying to do here.

Master computer has 2 nic cards running 2 different ips
10.x.1.x
x.x.5.1

The two slaves are running 1 nic card 1 ip
Slave 1: x.x.5.2
Slave 2: x.x.5.3

Since the Master and Slaves are running rsh functionality they share /home and /usr/local

What I want to happen:
User connects to 10.x.1.x
User refreshs and sees x.x.5.2
User refreshes again and sees x.x.5.2
User refreshes once again and sees x.x.5.1

Then I want to be able to:
Unplug x.x.5.2
User connects to 10.x.1.x
User Refreshes and sees x.x.5.3 instead of x.x.5.2
Basically a failover

I do not want a program to do this. Is there any way that this will work without a program?
 
Old 07-17-2003, 01:55 PM   #8
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
Quote:
Originally posted by youngclusterman
I do not want a program to do this. Is there any way that this will work without a program?
Try a magic wand.

How do you expect a computer to do "anything" without a program (instruction set).
 
Old 07-17-2003, 02:02 PM   #9
youngclusterman
LQ Newbie
 
Registered: Jul 2003
Posts: 7

Original Poster
Rep: Reputation: 0
I didn't mean it like that.. I meant besides this mod_backhand / mod_rewrite thing that I keep running into while searching for how to do this on the internet.. is there something I can alter in httpd.conf or some other file that I have now that will do what I need it to do?
 
Old 07-17-2003, 03:19 PM   #10
youngclusterman
LQ Newbie
 
Registered: Jul 2003
Posts: 7

Original Poster
Rep: Reputation: 0
Help?
 
Old 07-17-2003, 03:29 PM   #11
pnh73
Member
 
Registered: Jul 2003
Location: Birmingham, UK
Distribution: Ubuntu,Debian
Posts: 381

Rep: Reputation: 30
read this http://www.samag.com/documents/s=115...101a/0101a.htm you can do it with something called JASPer
 
Old 07-17-2003, 10:58 PM   #12
Capt_Caveman
Senior Member
 
Registered: Mar 2003
Distribution: Fedora
Posts: 3,658

Rep: Reputation: 69
You can try doing it without true load-balancer software, but the only way I can think of is with an apache module. I know you don't want to hear it, but I think mod_backhand or mod_rewrite could be used to do it (mod_rewrite can do just about anything).

I would stay away from trying to do it with port forwarding and iptables. The problem is that you'll have to come up with a way to get iptables to keep track of where the last request got sent and then dynamically assign a new ip address to forward to. That is going to be alot easier said than done. Even if you could come up with a way to do that with a script, you would cripple iptables and you're network would crawl.
 
Old 01-29-2004, 12:13 PM   #13
ne1scott
LQ Newbie
 
Registered: Jul 2003
Distribution: Red Hat
Posts: 11

Rep: Reputation: 0
using Apache load balancer

You can do it using Apache's built in load balancer. See http://www.ubeans.com/tomcat/ for a procedure on "Apache 1.3.23 + Tomcat 4.0.2 + Load Balancing" or see the updated version at http://raibledesigns.com/tomcat/ for "Apache 2.x + Tomcat 4.x
+ Load Balancing (or Private JVMs)". I got it all working using the old apache 1.3.23.11 on RedHat 7.3 but figuring out the lbfactor to get the balancing equal is a screwy task. Apache 2.0 supposedly has a fix for it.
It only requires changes to httpd.conf and a creation of workers.properties. Some tomcat .xml files also need changes.
 
  


Reply



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
cannot ping cluster node...pxe-error..help dogma Linux - Newbie 2 09-13-2006 11:34 AM
Update/upgrade cluster through one node? jford_oldman Debian 8 11-02-2005 07:09 PM
Linux Cluster - Random Node Crash ! insanecrac007 Linux - General 0 08-17-2004 10:30 AM
cant ping a node in a cluster.. dogma Linux - Networking 3 05-21-2003 11:06 PM
how do I SSH into a cluster node? dogma Linux - Newbie 4 05-15-2003 04:31 PM

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

All times are GMT -5. The time now is 02:17 AM.

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