Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: Apachee Tomcat lbfactor |
|
Author |
|
jrparrish
Joined: 06 Oct 2010 Posts: 2
|
Posted: Wed 06 Oct '10 22:45 Post subject: Apachee Tomcat lbfactor |
|
|
I have an issue with load balancing in Apache Tomcat 6 with mod_jk.
I have a 2 Tomcat instances sharing the load on 2 different servers.
Sticky Sessions are working fine, and they are also failing over to each server once one fails.
My only problem is that the"lbfactor" parameter is not working in my workers.properties. Tomcat or Apache does seem to recognize no matter what I put in there.
It contiues to do a round-robin to each server equally. I want it to do a 10-1. Lbfactor seems to be my only problem which is weird.
Have you any of you seen this before?
Any help is appreciated. I can copy my config files if you need to see them. I thought I would ask first and was hoping maybe somebody would have a clue to why this is happening. |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
Posted: Thu 07 Oct '10 10:40 Post subject: |
|
|
I know it only from the apache side, not tomcat. In apache you can set
min and max and loadfactor
e.g.
Code: |
<Proxy balancer://pool1>
BalancerMember http://server1:8080 min=10 max=50 loadfactor=2
BalancerMember http://server2:8080 min=5 max=25 loadfactor=1
</Proxy>
ProxyPass /shop balancer://pool1 lbmethod=byrequests nofailover=Off maxattempts=3 stickysession=PHPSESSIONID
|
For details see http://httpd.apache.org/docs/current/mod/mod_proxy.html |
|
Back to top |
|
jrparrish
Joined: 06 Oct 2010 Posts: 2
|
Posted: Thu 07 Oct '10 17:29 Post subject: |
|
|
I appreciate the prompt response. I will definitely give this a try.
So if I use mod_proxy, and disable mod_jk, do I just need to comment out the mod_jk module in httpd.conf?
Do I need to delete config file parameters or will just commenting it out take care of everything?
Thanks. |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
Posted: Thu 07 Oct '10 17:37 Post subject: |
|
|
You have to comment out the module and the relevant code.
Back to the mod_jk problem. How did you set it up? Did you configure the JkWorkersFile? I guess you did cause the other properties seem to work as from your description. |
|
Back to top |
|
|
|
|
|
|