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/13 09:52:52 UTC

Tomcat 5.5 load balancing URL redirefction not transparent to client

Hi,
I'm separating this question from my earlier thread on load balancing 
rules - it
seems that it was over-looked there since it did not fit in there :(.

My question is that when I use the default balancer webapp from Tomcat 
5.5 the
redirection rules redirect me to either jakarta, cnn or yahoo's site. 
However,
the redirection is not transparent to the user.

for example,
Client Types : http://servername:8080/balancer/
Balancer Redirects To: http://jakarta.apache.org
*The browser URL changes to  : http://jakarta.apache.org*

I think this change of URL does not make the transition transparent. 
Also, the
subsequent requests bypass the load balancer(LB) and are directly served 
by the
server (so what happens if the server is down - the LB has support for 
fail over
but the request never went via the LB)

Please could someone throw some light on the same?
Awaiting responses,

-- 
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 URL redirefction not transparent to client

Posted by Filip Hanik - Dev Lists <de...@hanik.com>.
Madhur K Tanwani wrote:
> Thanks Filip.
> I understand now that Tomcat performs redirection - which implies that 
> the
> URL must change.
> Then, I suppose I must ask
> - Is something like mod_proxy available in Tomcat?
> - Is it possible to emulate the same behavior in Tomcat?
not really, Tomcat isn't really built for any of that kind of stuff 
either, even the "tomcat balancer" is not a real load balancer, its just 
an example app, but you would never use it in the real world due to 
blocking IO and thread dependencies in Tomcat/Java
>
> After my discussion on the Tomcat 5.5 load balancing thread and this 
> one, I'm
> thinking of a setup like
> <request>
>     |
>    V
> Apache 2.0 httpd Webserver
> (LB with sticky sessions, weighted round robin, mod_jk2)
mod_jk2 is obsolete and longer used nor developed. You would need to go 
with mod_jk 1.2.15
>    |
>    |--------> Tomcat Worker 1 (ajp13)
>    |--------> Tomcat Worker 2 (ajp13)
>    |--------> Tomcat Worker 3 (ajp13)
>
> The session management will be done using either JDBCStore or in-memory
> replication amongst the Tomcat servers.
>
> Can you suggest something in the design that is wither wrong or can be 
> improved?
> Is there something that the LB gurus find obviously wrong here and 
> would want to
> tell me (or would you want me to encounter it as it comes :) )?
looks good, if you only have one httpd, is that a single point of 
failure for you?


>
> Awaiting your valuable comments,
> Madhur.
>
> Filip Hanik - Dev Lists wrote:
>> redirection, as the name tells you, doesn't balance, it redirects, 
>> and there is nothing transparent about a redirection.
>> what you are looking for is called proxying, and the best example for 
>> that, would be mod_proxy in the Apache httpd web server.
>>
>>
>> Filip
>>
>> Madhur K Tanwani wrote:
>>> Hi,
>>> I'm separating this question from my earlier thread on load 
>>> balancing rules - it
>>> seems that it was over-looked there since it did not fit in there :(.
>>>
>>> My question is that when I use the default balancer webapp from 
>>> Tomcat 5.5 the
>>> redirection rules redirect me to either jakarta, cnn or yahoo's 
>>> site. However,
>>> the redirection is not transparent to the user.
>>>
>>> for example,
>>> Client Types : http://servername:8080/balancer/
>>> Balancer Redirects To: http://jakarta.apache.org
>>> *The browser URL changes to  : http://jakarta.apache.org*
>>>
>>> I think this change of URL does not make the transition transparent. 
>>> Also, the
>>> subsequent requests bypass the load balancer(LB) and are directly 
>>> served by the
>>> server (so what happens if the server is down - the LB has support 
>>> for fail over
>>> but the request never went via the LB)
>>>
>>> Please could someone throw some light on the same?
>>> Awaiting responses,
>>>
>>
>>
>> ---------------------------------------------------------------------
>> 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
>>
>>
>
>


---------------------------------------------------------------------
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 URL redirefction not transparent to client

Posted by Pid <p...@pidster.com>.
I'd suggest investigating Apache2.2 and mod_proxy + mod_proxy_ajp +
mod_proxy_balancer.



Madhur K Tanwani wrote:
> Thanks Filip.
> I understand now that Tomcat performs redirection - which implies that the
> URL must change.
> Then, I suppose I must ask
> - Is something like mod_proxy available in Tomcat?
> - Is it possible to emulate the same behavior in Tomcat?
> 
> After my discussion on the Tomcat 5.5 load balancing thread and this
> one, I'm
> thinking of a setup like
> <request>
>     |
>    V
> Apache 2.0 httpd Webserver
> (LB with sticky sessions, weighted round robin, mod_jk2)
>    |
>    |--------> Tomcat Worker 1 (ajp13)
>    |--------> Tomcat Worker 2 (ajp13)
>    |--------> Tomcat Worker 3 (ajp13)
> 
> The session management will be done using either JDBCStore or in-memory
> replication amongst the Tomcat servers.
> 
> Can you suggest something in the design that is wither wrong or can be
> improved?
> Is there something that the LB gurus find obviously wrong here and would
> want to
> tell me (or would you want me to encounter it as it comes :) )?
> 
> Awaiting your valuable comments,
> Madhur.
> 
> Filip Hanik - Dev Lists wrote:
>> redirection, as the name tells you, doesn't balance, it redirects, and
>> there is nothing transparent about a redirection.
>> what you are looking for is called proxying, and the best example for
>> that, would be mod_proxy in the Apache httpd web server.
>>
>>
>> Filip
>>
>> Madhur K Tanwani wrote:
>>> Hi,
>>> I'm separating this question from my earlier thread on load balancing
>>> rules - it
>>> seems that it was over-looked there since it did not fit in there :(.
>>>
>>> My question is that when I use the default balancer webapp from
>>> Tomcat 5.5 the
>>> redirection rules redirect me to either jakarta, cnn or yahoo's site.
>>> However,
>>> the redirection is not transparent to the user.
>>>
>>> for example,
>>> Client Types : http://servername:8080/balancer/
>>> Balancer Redirects To: http://jakarta.apache.org
>>> *The browser URL changes to  : http://jakarta.apache.org*
>>>
>>> I think this change of URL does not make the transition transparent.
>>> Also, the
>>> subsequent requests bypass the load balancer(LB) and are directly
>>> served by the
>>> server (so what happens if the server is down - the LB has support
>>> for fail over
>>> but the request never went via the LB)
>>>
>>> Please could someone throw some light on the same?
>>> Awaiting responses,
>>>
>>
>>
>> ---------------------------------------------------------------------
>> 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
>>
>>
> 
> 

---------------------------------------------------------------------
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 URL redirefction not transparent to client

Posted by Tim Lucia <ti...@yahoo.com>.
I didn't see anyone else point this out (maybe they did and I missed it) but
you want to use JK now, not JK2 (it's deprecated, unsupported, ...)

Tim

> -----Original Message-----
> From: Madhur K Tanwani [mailto:madhurtanwani@gmail.com]
> Sent: Friday, July 14, 2006 1:15 AM
> To: Tomcat Users List
> Subject: Re: Tomcat 5.5 load balancing URL redirefction not transparent to
> client
> 
> Thanks Filip.
> I understand now that Tomcat performs redirection - which implies that the
> URL must change.
> Then, I suppose I must ask
> - Is something like mod_proxy available in Tomcat?
> - Is it possible to emulate the same behavior in Tomcat?
> 
> After my discussion on the Tomcat 5.5 load balancing thread and this
> one, I'm
> thinking of a setup like
> <request>
>      |
>     V
> Apache 2.0 httpd Webserver
> (LB with sticky sessions, weighted round robin, mod_jk2)
>     |
>     |--------> Tomcat Worker 1 (ajp13)
>     |--------> Tomcat Worker 2 (ajp13)
>     |--------> Tomcat Worker 3 (ajp13)
> 
> The session management will be done using either JDBCStore or in-memory
> replication amongst the Tomcat servers.
> 
> Can you suggest something in the design that is wither wrong or can be
> improved?
> Is there something that the LB gurus find obviously wrong here and would
> want to
> tell me (or would you want me to encounter it as it comes :) )?
> 
> Awaiting your valuable comments,
> Madhur.
> 
> Filip Hanik - Dev Lists wrote:
> > redirection, as the name tells you, doesn't balance, it redirects, and
> > there is nothing transparent about a redirection.
> > what you are looking for is called proxying, and the best example for
> > that, would be mod_proxy in the Apache httpd web server.
> >
> >
> > Filip
> >
> > Madhur K Tanwani wrote:
> >> Hi,
> >> I'm separating this question from my earlier thread on load balancing
> >> rules - it
> >> seems that it was over-looked there since it did not fit in there :(.
> >>
> >> My question is that when I use the default balancer webapp from
> >> Tomcat 5.5 the
> >> redirection rules redirect me to either jakarta, cnn or yahoo's site.
> >> However,
> >> the redirection is not transparent to the user.
> >>
> >> for example,
> >> Client Types : http://servername:8080/balancer/
> >> Balancer Redirects To: http://jakarta.apache.org
> >> *The browser URL changes to  : http://jakarta.apache.org*
> >>
> >> I think this change of URL does not make the transition transparent.
> >> Also, the
> >> subsequent requests bypass the load balancer(LB) and are directly
> >> served by the
> >> server (so what happens if the server is down - the LB has support
> >> for fail over
> >> but the request never went via the LB)
> >>
> >> Please could someone throw some light on the same?
> >> Awaiting responses,
> >>
> >
> >
> > ---------------------------------------------------------------------
> > 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
> >
> >
> 
> 
> --
> __________________________
> Madhur Kumar Tanwani
> madhurtanwani@gmail.com
> Ph.: 0253-5614792.
> __________________________
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> +  A bus station is where a bus stops. A train station
> + is where train stops. On my desk, I have a work station...
> + What more can I say !
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> 
> 
> ---------------------------------------------------------------------
> 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


---------------------------------------------------------------------
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 URL redirefction not transparent to client

Posted by Madhur K Tanwani <ma...@gmail.com>.
Thanks Filip.
I understand now that Tomcat performs redirection - which implies that the
URL must change.
Then, I suppose I must ask
- Is something like mod_proxy available in Tomcat?
- Is it possible to emulate the same behavior in Tomcat?

After my discussion on the Tomcat 5.5 load balancing thread and this 
one, I'm
thinking of a setup like
<request>
     |
    V
Apache 2.0 httpd Webserver
(LB with sticky sessions, weighted round robin, mod_jk2)
    |
    |--------> Tomcat Worker 1 (ajp13)
    |--------> Tomcat Worker 2 (ajp13)
    |--------> Tomcat Worker 3 (ajp13)

The session management will be done using either JDBCStore or in-memory
replication amongst the Tomcat servers.

Can you suggest something in the design that is wither wrong or can be 
improved?
Is there something that the LB gurus find obviously wrong here and would 
want to
tell me (or would you want me to encounter it as it comes :) )?

Awaiting your valuable comments,
Madhur.

Filip Hanik - Dev Lists wrote:
> redirection, as the name tells you, doesn't balance, it redirects, and 
> there is nothing transparent about a redirection.
> what you are looking for is called proxying, and the best example for 
> that, would be mod_proxy in the Apache httpd web server.
>
>
> Filip
>
> Madhur K Tanwani wrote:
>> Hi,
>> I'm separating this question from my earlier thread on load balancing 
>> rules - it
>> seems that it was over-looked there since it did not fit in there :(.
>>
>> My question is that when I use the default balancer webapp from 
>> Tomcat 5.5 the
>> redirection rules redirect me to either jakarta, cnn or yahoo's site. 
>> However,
>> the redirection is not transparent to the user.
>>
>> for example,
>> Client Types : http://servername:8080/balancer/
>> Balancer Redirects To: http://jakarta.apache.org
>> *The browser URL changes to  : http://jakarta.apache.org*
>>
>> I think this change of URL does not make the transition transparent. 
>> Also, the
>> subsequent requests bypass the load balancer(LB) and are directly 
>> served by the
>> server (so what happens if the server is down - the LB has support 
>> for fail over
>> but the request never went via the LB)
>>
>> Please could someone throw some light on the same?
>> Awaiting responses,
>>
>
>
> ---------------------------------------------------------------------
> 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
>
>


-- 
__________________________
Madhur Kumar Tanwani
madhurtanwani@gmail.com
Ph.: 0253-5614792.
__________________________
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+  A bus station is where a bus stops. A train station
+ is where train stops. On my desk, I have a work station...
+ What more can I say !
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++


---------------------------------------------------------------------
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 URL redirefction not transparent to client

Posted by Filip Hanik - Dev Lists <de...@hanik.com>.
redirection, as the name tells you, doesn't balance, it redirects, and 
there is nothing transparent about a redirection.
what you are looking for is called proxying, and the best example for 
that, would be mod_proxy in the Apache httpd web server.


Filip

Madhur K Tanwani wrote:
> Hi,
> I'm separating this question from my earlier thread on load balancing 
> rules - it
> seems that it was over-looked there since it did not fit in there :(.
>
> My question is that when I use the default balancer webapp from Tomcat 
> 5.5 the
> redirection rules redirect me to either jakarta, cnn or yahoo's site. 
> However,
> the redirection is not transparent to the user.
>
> for example,
> Client Types : http://servername:8080/balancer/
> Balancer Redirects To: http://jakarta.apache.org
> *The browser URL changes to  : http://jakarta.apache.org*
>
> I think this change of URL does not make the transition transparent. 
> Also, the
> subsequent requests bypass the load balancer(LB) and are directly 
> served by the
> server (so what happens if the server is down - the LB has support for 
> fail over
> but the request never went via the LB)
>
> Please could someone throw some light on the same?
> Awaiting responses,
>


---------------------------------------------------------------------
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