You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Madhur K Tanwani <ma...@gmail.com> on 2006/07/10 17:40:22 UTC
Tomcat 5.5 Load Balancing Rule Classes
Hi,
Greetings to all in my first mail on the list.
I've read the article on "How To Ask Questions The Smart Way" -
will try to adhere to it, but please don't mind a few misses :).
First with some background. This request is regarding the classes that
implements the rules, as used in the rules.xml file in the balancer
webapp that ships with Tomcat 5.5. I'm configuring a Tomcat setup with one
load balancer and 3 workers in one cluster. The setup details are :
OS : Linux (2.6.11-1.1369_FC4)
Tomcat : 5.5 (all)
JDK : 1.5
I've being studying through the configuration references from :-
- the Tomcat load balancing HOW-To -
http://tomcat.apache.org/tomcat-5.5-doc/printer/balancer-howto.html
- the Tomcat clustering HOW-To -
http://tomcat.apache.org/tomcat-5.5-doc/printer/cluster-howto.html
- an article on OnJava.com -
http://www.onjava.com/pub/a/onjava/2004/04/14/clustering.html (for Tomcat 5)
However, what I find is that Tomcat 5.5 by defaults supports basic Rule
Classes
like AcceptEverythingRule, URLStringMatchRule etc. I am trying to build a
load balancer which enforces the following :-
- chooses from the available "alive" workers from the cluster,
in a Round-Robin / Least-Load-First manner
- implements session affinity
- includes fail over support with session replication, so there is
no loss
of session data
- The transition is transparent to the user. Hence, whatever be the
"redirectURL", the URL in the browser should not change
As you might expect, the problem is that, this kind of behavior is not
available with the the standard Tomcat installation.
Also, is the transparent transition possible?
I read in the load balancer HOW-To that this list is the best place to
inquire
for latest Rule classes and details.
I've also browsed through the archives, till April 2006 (it was then that I
realized that a search feature there would greatly help!), but did not get
this answer.
I also realize that I can implement the org.apache.webapp.balancer.Rule
interface to generate Rules that I want (in fact that is what the article
on OnJava has provided).
But what I was inquisitive about was whether such standard Rule classes
have been implemented? Are there any pointers to such resources?
On another note, I wanted to ask the clustering and load-balancing gurus,
whether I've taken up the correct approach. I see that many load balancing
tutorials focus on Apache as the load balancer with Tomcat as the worker
in clusters. But since most of them are old, I assume the new Tomcat 5.5
features did not make it then - hence the question.
Please could anyone on the list, help me with these problems? Any
pointers to
resources would be a great help. In case there is anything else that
must have
mentioned that would ease thinking on the problem, do ask me for it.
Thanks a lot,
--
__________________________
Madhur Kumar Tanwani
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Tomcat Monitoring
Posted by Leon Rosenberg <ro...@googlemail.com>.
please define monitoring.
which data do you want to get? do you want to monitor your production
webapps status? monitor your hits? availability?
leon
On 7/12/06, Mr Alireza Fattahi <af...@yahoo.com> wrote:
> Hi,
>
> We are using Tomcat 5.5, please let us know if there are any monitoring tools that we can use with this server.
> We found Lambda Probe mentioned in the posts.
> Are there any built-in tools, or can we find some open sources for this issue?!
>
>
>
>
> ~Regards,
> ~~Alireza Fattahi
>
> ---------------------------------
> All New Yahoo! Mail – Tired of Vi@gr@! come-ons? Let our SpamGuard protect you.
>
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Tomcat Monitoring
Posted by Mark Thomas <ma...@apache.org>.
When starting a new thread (ie sending a message to the list about a
new topic) please do not reply to an existing message and change the
subject line. To many of the list archiving services and mail clients
used by list subscribers this makes your new message appear as part
of the old thread. This makes it harder for other users to find
relevant information when searching the lists.
This is known as thread hijacking and is behaviour that is frowned
upon on this list. Frequent offenders will be removed from the list.
It should also be noted that many list subscribers automatically
ignore any messages that hijack another thread.
The correct procedure is to create a new message with a new subject.
This will start a new thread.
Mark
tomcat-user-owner
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Tomcat Monitoring
Posted by Mr Alireza Fattahi <af...@yahoo.com>.
Hi,
We are using Tomcat 5.5, please let us know if there are any monitoring tools that we can use with this server.
We found Lambda Probe mentioned in the posts.
Are there any built-in tools, or can we find some open sources for this issue?!
~Regards,
~~Alireza Fattahi
---------------------------------
All New Yahoo! Mail Tired of Vi@gr@! come-ons? Let our SpamGuard protect you.
Re: Tomcat 5.5 Load Balancing Rule Classes
Posted by Madhur K Tanwani <ma...@gmail.com>.
Hi,
Thanks Michael, for your reply. I've almost got my setup up and working
with Tomcat load balancer, session affinity and replication.
But, we have not yet answered the question, it seems. Here are some that
stick :
- does Tomcat 5.5 release incorporate advance Rule Classes? (RoundRobin
/ Weighted).
- Are there guidelines to develop such Rule Classes? Has anyone
developed such Rule Classes that are being used widely in production?
- How can I avoid the change of the URL in the browser, when using
Tomcat 5.5. balancer webapp? My colleague once implemented a Apache load
balancer and did not see any URL change in the browser- so I assume it
is possible.
I followed the connector how-to Michael sent. However, it seems to be
integrating Apache with Tomcat, with Apache as the load balancer. I
realize that this maybe the most common configuration (Apache as the
load balancer with tomcat as workers).
But is that the only way? I mean, is using Tomcat 5.5's balancer webapp
any performance hit as compared to using Apache as the load balancer? Or
is it because the Tomcat 5.5 balancer webapp has not matured enough, and
Apache has been the choice since history? Or is it something else that I
don't know yet!!
I searched the tomcat-user list on MARC and found a post by Fritz
Schneider,
(http://marc.theaimsgroup.com/?l=tomcat-user&m=111644303106705&w=2),
which enlists the reasons why the use of Apache-Tomcat couple would be
required (keeping in mind that post Tomcat 4 the devs have enhanced
Tomcat to serve html pages most efficiently).
What I would like this thread to evolve into, is a comparison chart for
Apache load balancing Vs Tomcat balancer webapp and source to load
balancer Rule Classes for Tomcat 5.5.
Awaiting your valuable responses,
Thanks a lot,
Madhur.
Michael Echerer wrote:
> Madhur K Tanwani wrote:
>
>> I am trying to build a
>> load balancer which enforces the following :-
>> - chooses from the available "alive" workers from the cluster,
>> in a Round-Robin / Least-Load-First manner
>> - implements session affinity
>>
> See: http://tomcat.apache.org/connectors-doc/
>
>> - includes fail over support with session replication, so there is no
>> loss
>> of session data
>> - The transition is transparent to the user. Hence, whatever be the
>> "redirectURL", the URL in the browser should not change
>>
> See: http://tomcat.apache.org/tomcat-5.5-doc/cluster-howto.html
>
>> On another note, I wanted to ask the clustering and load-balancing gurus,
>> whether I've taken up the correct approach. I see that many load balancing
>> tutorials focus on Apache as the load balancer with Tomcat as the worker
>> in clusters. But since most of them are old, I assume the new Tomcat 5.5
>> features did not make it then - hence the question.
>>
> You can use Apache2, mod_jk1.2 and Tomcat's session replication for what
> you plan to do. However session replication looks as easy as putting
> <distributable/> into web.xml, but actually keeping the webapp session
> serializable and small has to be kept in mind always.
>
> Cheers,
> Michael
--
__________________________
Madhur Kumar Tanwani
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Tomcat 5.5 Load Balancing Rule Classes
Posted by Michael Echerer <me...@tngtech.com>.
Madhur K Tanwani wrote:
> I am trying to build a
> load balancer which enforces the following :-
> - chooses from the available "alive" workers from the cluster,
> in a Round-Robin / Least-Load-First manner
> - implements session affinity
See: http://tomcat.apache.org/connectors-doc/
> - includes fail over support with session replication, so there is no
> loss
> of session data
> - The transition is transparent to the user. Hence, whatever be the
> "redirectURL", the URL in the browser should not change
See: http://tomcat.apache.org/tomcat-5.5-doc/cluster-howto.html
>
> On another note, I wanted to ask the clustering and load-balancing gurus,
> whether I've taken up the correct approach. I see that many load balancing
> tutorials focus on Apache as the load balancer with Tomcat as the worker
> in clusters. But since most of them are old, I assume the new Tomcat 5.5
> features did not make it then - hence the question.
You can use Apache2, mod_jk1.2 and Tomcat's session replication for what
you plan to do. However session replication looks as easy as putting
<distributable/> into web.xml, but actually keeping the webapp session
serializable and small has to be kept in mind always.
Cheers,
Michael
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Tomcat 5.5 Load Balancing Rule Classes
Posted by welcome77in <go...@gmail.com>.
you can refer workers.properties file in apache and this file can be created
in apache_home/conf/ path
workers.tomcat_home=/tomcat
workers.java_home=$JAVA_HOME
ps=/
worker.list=tomcat,loadbalancer
worker.tomcatC.port=8009
worker.tomcatC.host=192.168.1.80
worker.tomcatC.type=ajp13
worker.tomcatC.lbfactor=1
worker.loadbalancer.type=lb
worker.loadbalancer.balanced_workers=tomcat
worker.loadbalancer.sticky_session=1
you may refer to this link also for basic knowledge
http://www.easywayserver.com/
http://tomcat.apache.org/tomcat-5.5-doc/printer/balancer-howto.html
--
View this message in context: http://www.nabble.com/Tomcat-5.5-Load-Balancing-Rule-Classes-tf1919151.html#a5304476
Sent from the Tomcat - User forum at Nabble.com.
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org