Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
"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?
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.
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?
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?
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.