tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Harsimranjit singh Kler <>
Subject Re: Tomcat(5.5) Clustering and Load Balancing.
Date Mon, 03 Jan 2011 09:40:43 GMT

Here is details:

*Tomcat version*: 5.5.27
*OS*:Window XP
*Environment Trying to Create* :Load balancing and Clustering on single
Machine using tomcat instances only(balancer Feature) .

*What i have Achieved*:i am running 4 instances of tomcat on ports
8080,9080,10080,11080.So port 8080 tomcat work as balancer and other works
as cluster.(Using Multicasting IP and Port {check server.xml} it works
attached find server.xml,web.xml,rule.xml of balancer tomcat(8080).

So using  balancer feature in tomcat and rule.xml and some customized
classes requests are successfully redirected to one of cluster ie 9080,10080
or 11080 instance.

*Issue*:when request redirected from tomcat balancer(on 8080 port) to any
cluster (tomcat instance on 9080,10080 or 11080 port) URL in address bar
also changed. i dont want to display cluster URL.So how i can achive this?.

i think "org.apache.webapp.balancer.BalancerFilter"  class internally use
SendRedirect() method .

I tried with requestDispatcher..Forward() but it accept only realtive

so please suggest me

Thanks in advance


On Tue, Dec 28, 2010 at 9:23 PM, David Smith <>wrote:

>  On 12/28/2010 8:33 AM, Pid wrote:
> > On 12/27/10 4:11 AM, Harsimranjit singh Kler wrote:
> >> Hi
> >>
> >> i have testing tomcat clustering on single machine.What i am able to do
> is i
> >> hv 4 tomcat instances 1 work as balancer and 3 as cluster.using Rule.xml
> in
> >> balancer with round robin approach.all requests hits on balancer
> redirected
> >> to on one cluster which is on some different port.
> >> when redirecting using sendredirect it display new url that is of
> cluster.i
> >> want some alternate so all request shoud handled at balancer and URL at
> >> adress bar not changed.
> >>
> >> i have tried forward from servelet but that is not accept only realtive
> URL.
> > I'm sorry, I don't have any idea what you're actually asking.
> >
> > Please read:
> >
> >
> >
> > When you reply, please precisely detail your Tomcat, JVM and OS
> > versions, also include an accurate description of the environment you
> > have created and are trying to create.
> >
> >
> >
> From what I read in the message, it appears the balancer is sending the
> browser a redirect (one of the 30x responses) which in turn changes the
> url in the browser's address bar.  The OP (if I understand correctly)
> would like the url in the browser's address bar not to change at all (no
> 30x redirect response).  The only way I can imagine that working is if
> the balancer acts as a reverse proxy, sending each request back to a
> different back-end worker.  I think we need to see the balancer's config
> before we could even begin to offer suggestions.
> --David
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:



Harsimranjit Singh Kler

View raw message