You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Sharmistha jat <sh...@gmail.com> on 2009/04/15 15:30:03 UTC
gsoc project - Tomcat proxy [query]
Dear All,
I have applied for tomcat proxy project, but i needed a little more
information than given in the project idea, to start with the design of
proxy.
So i would like to know more about the following:
1) Type of proxy [reverse,content filter,caching etc].
2) Use [intent]
I have studied a number of servlet proxies like j2ep, noodle & Http Proxy
Servlet in past days.
And was puzzled about my intent of making proxy and its designing thereof.
So, please guide me a little bit about this.
Thanks
Sharmistha
v <javascript://nop/>
Re: gsoc project - Tomcat proxy [query]
Posted by Jess Holle <je...@ptc.com>.
A Tomcat-based reverse proxy with a pluggable load balancer would be
/huge/ in my opinion.
Having to resort to Apache (or a hardware load balancer) to distribute
load across multiple Tomcats is /really /unfortunate.
What's needed is a high-performance Java-based proxy load balancer that
makes it easy to get at the balancing algorithm. This should support
use cases like balancing new requests to the backend that currently has
the fewest active sessions or to avoid any backend which is in a
low-memory state, for instance.
Trying to hack this sort of thing into mod_proxy_balancer or mod_jk is
just so much harder than doing this sort of thing in Java. Plus there's
the benefit of "build once run anywhere", i.e. cross-platform binaries.
--
Jess Holle
P.S. Caching at this level is quite uninteresting to me -- but could
seemingly be added via servlet request filters assuming the reverse
proxy was itself done as a servlet. Ideally the reverse proxy would
even be portable across servlet engines and designed for exposure via
JMX. [I say "designed for" as it seems everyone has their own way of
actually /doing/ JMX MBeans -- Tomcat uses Modeler and others use
something different. Me? I prefer just subclassing StandardMBean --
but with my own value-add subclass thereof, of course :-)]
jean-frederic clere wrote:
> Sharmistha jat wrote:
>> Dear All,
>>
>> I have applied for tomcat proxy project, but i needed a little more
>> information than given in the project idea, to start with the design of
>> proxy.
>>
>> So i would like to know more about the following:
>>
>> 1) Type of proxy [reverse,content filter,caching etc].
>
> Just a reverse proxy.
>
> For the content filter I think you mean soemthing like the ProxyPass
> and ProxyMatch of httpd, do you? If yes some filtering would be nice.
>
> Caching is interesting but not a requirement for a reverse proxy (you
> can have the static resource locally and server them locally).
>
>>
>> 2) Use [intent]
>
> The use would be to front-end TC or cluster of TC. httpd does that but
> the code is in C and it is a lot of work to have JAVA based
> administration (JMX for example). The proxy should support HTTP and
> HTTPS and could support AJP if you want.
>
>>
>> I have studied a number of servlet proxies like j2ep, noodle & Http
>> Proxy
>> Servlet in past days.
>
> Could you write a wiki on that? (Somewhere in
> http://wiki.apache.org/tomcat/).
>
> Cheers
>
> Jean-Frederic
>
>>
>> And was puzzled about my intent of making proxy and its designing
>> thereof.
>>
>> So, please guide me a little bit about this.
>>
>> Thanks
>> Sharmistha
>>
>>
>> v <javascript://nop/>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: dev-help@tomcat.apache.org
>
>
Re: gsoc project - Tomcat proxy [query]
Posted by jean-frederic clere <jf...@gmail.com>.
Sharmistha jat wrote:
> Dear All,
>
> I have applied for tomcat proxy project, but i needed a little more
> information than given in the project idea, to start with the design of
> proxy.
>
> So i would like to know more about the following:
>
> 1) Type of proxy [reverse,content filter,caching etc].
Just a reverse proxy.
For the content filter I think you mean soemthing like the ProxyPass and
ProxyMatch of httpd, do you? If yes some filtering would be nice.
Caching is interesting but not a requirement for a reverse proxy (you
can have the static resource locally and server them locally).
>
> 2) Use [intent]
The use would be to front-end TC or cluster of TC. httpd does that but
the code is in C and it is a lot of work to have JAVA based
administration (JMX for example). The proxy should support HTTP and
HTTPS and could support AJP if you want.
>
> I have studied a number of servlet proxies like j2ep, noodle & Http Proxy
> Servlet in past days.
Could you write a wiki on that? (Somewhere in
http://wiki.apache.org/tomcat/).
Cheers
Jean-Frederic
>
> And was puzzled about my intent of making proxy and its designing thereof.
>
> So, please guide me a little bit about this.
>
> Thanks
> Sharmistha
>
>
> v <javascript://nop/>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
Re: gsoc project - Tomcat proxy [query]
Posted by jean-frederic clere <jf...@gmail.com>.
Sharmistha jat wrote:
> Please find my wiki page about existing servlet proxy at :
> http://wiki.apache.org/tomcat/ServletProxy
>
> I will continue to add information to this page, please suggest any
> changes if required
A note on the state of each would be cool (It seems J2EP is dead for
example).
Cheers
Jean-Frederic
>
>
> On Thu, Apr 16, 2009 at 8:44 AM, Sharmistha jat
> <sh...@gmail.com> wrote:
>> Thanks for suggestion. [:)]
>>
>> On Thu, Apr 16, 2009 at 5:50 AM, Costin Manolache <co...@gmail.com> wrote:
>>> One suggestion: I think it would be nice to consider scalability - if you
>>> have one tomcat frontend forwarding to 100 backends and acting as a load
>>> balancer - you probably can't afford one connection per thread. Many of the
>>> http forwarders I know use a blocking http client library - I think this
>>> would be the wrong approach for tomcat.
>>>
>>> To do non-blocking you will need to work at coyote level, and probably make
>>> few enhancements to register your client connection with the same framework
>>> - i.e. use the same Selectors or APR poll.
>>> You would also need to implement a non-blocking http client - you can use
>>> the nio/apr as starting points as well, but the code is a bit messy ( IMHO
>>> ). Or you could just start from scratch - use an existing non-blocking http
>>> client.
>>>
>>> I have a small experimental async http client in sandbox, if you plan to go
>>> non-blocking it may be worth checking it out (I'll update it to what I have
>>> - it's kind-of-working ). But probably using the NIO/APR connectors would be
>>> a better starting point.
>>>
>>> Costin
>>>
>>> On Wed, Apr 15, 2009 at 1:18 PM, jean-frederic clere <jf...@gmail.com>wrote:
>>>
>>>> Sharmistha jat wrote:
>>>>
>>>>> So, now i would try to install a tomcat cluster and make a simple
>>>>> servlet proxy [reverse] for it, then add in load-balancing logic to it
>>>>>
>>>> Yep thst is the idea.
>>>>
>>>> +++ CUT +++
>>>>
>>>>
>>>>>>> I have studied a number of servlet proxies like j2ep, noodle & Http
>>>>>>>> Proxy
>>>>>>>> Servlet in past days.
>>>>>>>>
>>>>>>> Could you write a wiki on that? (Somewhere in
>>>>>>> http://wiki.apache.org/tomcat/).
>>>>>>>
>>>>> i guess u mean writing wiki about proxy servlet
>>>>> will give my best shot to it, but would borrow 3-4 days for the
>>>>> task.
>>>>>
>>>> You looked to the j2ep, noodle etc, don't you? It would be nice to describe
>>>> a little how they work or that least their main features and the url to
>>>> there code if applicable. Just like a note on other existing implementation.
>> Ok, will write a wiki on the existing servlet proxies, their
>> approach and working [thanks]
>>>> Cheers
>>>>
>>>> Jean-Frederic
>>>>
>>>>
>>>> Cheers
>>>>>>> Jean-Frederic
>>>>>>>
>>>>>>> And was puzzled about my intent of making proxy and its designing
>>>>>>>> thereof.
>>>>>>>>
>>>>>>>> So, please guide me a little bit about this.
>>>>>>>>
>>>>>>>> Thanks
>>>>>>>> Sharmistha
>>>>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
>>>>> For additional commands, e-mail: dev-help@tomcat.apache.org
>>>>>
>>>>>
>>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
>>>> For additional commands, e-mail: dev-help@tomcat.apache.org
>>>>
>>>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: dev-help@tomcat.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
Re: gsoc project - Tomcat proxy [query]
Posted by Sharmistha jat <sh...@gmail.com>.
Please find my wiki page about existing servlet proxy at :
http://wiki.apache.org/tomcat/ServletProxy
I will continue to add information to this page, please suggest any
changes if required
On Thu, Apr 16, 2009 at 8:44 AM, Sharmistha jat
<sh...@gmail.com> wrote:
> Thanks for suggestion. [:)]
>
> On Thu, Apr 16, 2009 at 5:50 AM, Costin Manolache <co...@gmail.com> wrote:
>> One suggestion: I think it would be nice to consider scalability - if you
>> have one tomcat frontend forwarding to 100 backends and acting as a load
>> balancer - you probably can't afford one connection per thread. Many of the
>> http forwarders I know use a blocking http client library - I think this
>> would be the wrong approach for tomcat.
>>
>> To do non-blocking you will need to work at coyote level, and probably make
>> few enhancements to register your client connection with the same framework
>> - i.e. use the same Selectors or APR poll.
>> You would also need to implement a non-blocking http client - you can use
>> the nio/apr as starting points as well, but the code is a bit messy ( IMHO
>> ). Or you could just start from scratch - use an existing non-blocking http
>> client.
>>
>> I have a small experimental async http client in sandbox, if you plan to go
>> non-blocking it may be worth checking it out (I'll update it to what I have
>> - it's kind-of-working ). But probably using the NIO/APR connectors would be
>> a better starting point.
>>
>> Costin
>>
>> On Wed, Apr 15, 2009 at 1:18 PM, jean-frederic clere <jf...@gmail.com>wrote:
>>
>>> Sharmistha jat wrote:
>>>
>>>> So, now i would try to install a tomcat cluster and make a simple
>>>> servlet proxy [reverse] for it, then add in load-balancing logic to it
>>>>
>>>
>>> Yep thst is the idea.
>>>
>>> +++ CUT +++
>>>
>>>
>>>>>> I have studied a number of servlet proxies like j2ep, noodle & Http
>>>>>>> Proxy
>>>>>>> Servlet in past days.
>>>>>>>
>>>>>> Could you write a wiki on that? (Somewhere in
>>>>>> http://wiki.apache.org/tomcat/).
>>>>>>
>>>>>
>>>> i guess u mean writing wiki about proxy servlet
>>>> will give my best shot to it, but would borrow 3-4 days for the
>>>> task.
>>>>
>>>
>>> You looked to the j2ep, noodle etc, don't you? It would be nice to describe
>>> a little how they work or that least their main features and the url to
>>> there code if applicable. Just like a note on other existing implementation.
>
> Ok, will write a wiki on the existing servlet proxies, their
> approach and working [thanks]
>>>
>>> Cheers
>>>
>>> Jean-Frederic
>>>
>>>
>>> Cheers
>>>>>>
>>>>>> Jean-Frederic
>>>>>>
>>>>>> And was puzzled about my intent of making proxy and its designing
>>>>>>> thereof.
>>>>>>>
>>>>>>> So, please guide me a little bit about this.
>>>>>>>
>>>>>>> Thanks
>>>>>>> Sharmistha
>>>>>>>
>>>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
>>>> For additional commands, e-mail: dev-help@tomcat.apache.org
>>>>
>>>>
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
>>> For additional commands, e-mail: dev-help@tomcat.apache.org
>>>
>>>
>>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
Re: gsoc project - Tomcat proxy [query]
Posted by Sharmistha jat <sh...@gmail.com>.
Thanks for suggestion. [:)]
On Thu, Apr 16, 2009 at 5:50 AM, Costin Manolache <co...@gmail.com> wrote:
> One suggestion: I think it would be nice to consider scalability - if you
> have one tomcat frontend forwarding to 100 backends and acting as a load
> balancer - you probably can't afford one connection per thread. Many of the
> http forwarders I know use a blocking http client library - I think this
> would be the wrong approach for tomcat.
>
> To do non-blocking you will need to work at coyote level, and probably make
> few enhancements to register your client connection with the same framework
> - i.e. use the same Selectors or APR poll.
> You would also need to implement a non-blocking http client - you can use
> the nio/apr as starting points as well, but the code is a bit messy ( IMHO
> ). Or you could just start from scratch - use an existing non-blocking http
> client.
>
> I have a small experimental async http client in sandbox, if you plan to go
> non-blocking it may be worth checking it out (I'll update it to what I have
> - it's kind-of-working ). But probably using the NIO/APR connectors would be
> a better starting point.
>
> Costin
>
> On Wed, Apr 15, 2009 at 1:18 PM, jean-frederic clere <jf...@gmail.com>wrote:
>
>> Sharmistha jat wrote:
>>
>>> So, now i would try to install a tomcat cluster and make a simple
>>> servlet proxy [reverse] for it, then add in load-balancing logic to it
>>>
>>
>> Yep thst is the idea.
>>
>> +++ CUT +++
>>
>>
>>>>> I have studied a number of servlet proxies like j2ep, noodle & Http
>>>>>> Proxy
>>>>>> Servlet in past days.
>>>>>>
>>>>> Could you write a wiki on that? (Somewhere in
>>>>> http://wiki.apache.org/tomcat/).
>>>>>
>>>>
>>> i guess u mean writing wiki about proxy servlet
>>> will give my best shot to it, but would borrow 3-4 days for the
>>> task.
>>>
>>
>> You looked to the j2ep, noodle etc, don't you? It would be nice to describe
>> a little how they work or that least their main features and the url to
>> there code if applicable. Just like a note on other existing implementation.
Ok, will write a wiki on the existing servlet proxies, their
approach and working [thanks]
>>
>> Cheers
>>
>> Jean-Frederic
>>
>>
>> Cheers
>>>>>
>>>>> Jean-Frederic
>>>>>
>>>>> And was puzzled about my intent of making proxy and its designing
>>>>>> thereof.
>>>>>>
>>>>>> So, please guide me a little bit about this.
>>>>>>
>>>>>> Thanks
>>>>>> Sharmistha
>>>>>>
>>>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
>>> For additional commands, e-mail: dev-help@tomcat.apache.org
>>>
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: dev-help@tomcat.apache.org
>>
>>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
Re: gsoc project - Tomcat proxy [query]
Posted by Costin Manolache <co...@gmail.com>.
One suggestion: I think it would be nice to consider scalability - if you
have one tomcat frontend forwarding to 100 backends and acting as a load
balancer - you probably can't afford one connection per thread. Many of the
http forwarders I know use a blocking http client library - I think this
would be the wrong approach for tomcat.
To do non-blocking you will need to work at coyote level, and probably make
few enhancements to register your client connection with the same framework
- i.e. use the same Selectors or APR poll.
You would also need to implement a non-blocking http client - you can use
the nio/apr as starting points as well, but the code is a bit messy ( IMHO
). Or you could just start from scratch - use an existing non-blocking http
client.
I have a small experimental async http client in sandbox, if you plan to go
non-blocking it may be worth checking it out (I'll update it to what I have
- it's kind-of-working ). But probably using the NIO/APR connectors would be
a better starting point.
Costin
On Wed, Apr 15, 2009 at 1:18 PM, jean-frederic clere <jf...@gmail.com>wrote:
> Sharmistha jat wrote:
>
>> So, now i would try to install a tomcat cluster and make a simple
>> servlet proxy [reverse] for it, then add in load-balancing logic to it
>>
>
> Yep thst is the idea.
>
> +++ CUT +++
>
>
>>>> I have studied a number of servlet proxies like j2ep, noodle & Http
>>>>> Proxy
>>>>> Servlet in past days.
>>>>>
>>>> Could you write a wiki on that? (Somewhere in
>>>> http://wiki.apache.org/tomcat/).
>>>>
>>>
>> i guess u mean writing wiki about proxy servlet
>> will give my best shot to it, but would borrow 3-4 days for the
>> task.
>>
>
> You looked to the j2ep, noodle etc, don't you? It would be nice to describe
> a little how they work or that least their main features and the url to
> there code if applicable. Just like a note on other existing implementation.
>
> Cheers
>
> Jean-Frederic
>
>
> Cheers
>>>>
>>>> Jean-Frederic
>>>>
>>>> And was puzzled about my intent of making proxy and its designing
>>>>> thereof.
>>>>>
>>>>> So, please guide me a little bit about this.
>>>>>
>>>>> Thanks
>>>>> Sharmistha
>>>>>
>>>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: dev-help@tomcat.apache.org
>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: dev-help@tomcat.apache.org
>
>
Re: gsoc project - Tomcat proxy [query]
Posted by jean-frederic clere <jf...@gmail.com>.
Sharmistha jat wrote:
> So, now i would try to install a tomcat cluster and make a simple
> servlet proxy [reverse] for it, then add in load-balancing logic to it
Yep thst is the idea.
+++ CUT +++
>>>
>>>> I have studied a number of servlet proxies like j2ep, noodle & Http
>>>> Proxy
>>>> Servlet in past days.
>>> Could you write a wiki on that? (Somewhere in
>>> http://wiki.apache.org/tomcat/).
>
> i guess u mean writing wiki about proxy servlet
> will give my best shot to it, but would borrow 3-4 days for the task.
You looked to the j2ep, noodle etc, don't you? It would be nice to
describe a little how they work or that least their main features and
the url to there code if applicable. Just like a note on other existing
implementation.
Cheers
Jean-Frederic
>>> Cheers
>>>
>>> Jean-Frederic
>>>
>>>> And was puzzled about my intent of making proxy and its designing
>>>> thereof.
>>>>
>>>> So, please guide me a little bit about this.
>>>>
>>>> Thanks
>>>> Sharmistha
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: dev-help@tomcat.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
Re: gsoc project - Tomcat proxy [query]
Posted by Sharmistha jat <sh...@gmail.com>.
So, now i would try to install a tomcat cluster and make a simple
servlet proxy [reverse] for it, then add in load-balancing logic to it
[other parts like filtering n caching can be seen later]
thanks for your help, its really helped me to see the project more clearly.
>A Tomcat-based reverse proxy with a pluggable load balancer would be
>/huge/ in my opinion.
>Having to resort to Apache (or a hardware load balancer) to distribute
>load across multiple Tomcats is /really /unfortunate.
>What's needed is a high-performance Java-based proxy load balancer that
>makes it easy to get at the balancing algorithm. This should support
>use cases like balancing new requests to the backend that currently has
>the fewest active sessions or to avoid any backend which is in a
>low-memory state, for instance.
>Trying to hack this sort of thing into mod_proxy_balancer or mod_jk is
>just so much harder than doing this sort of thing in Java. Plus there's
>the benefit of "build once run anywhere", i.e. cross-platform binaries.
>--
>Jess Holle
>P.S. Caching at this level is quite uninteresting to me -- but could
>seemingly be added via servlet request filters assuming the reverse
>proxy was itself done as a servlet. Ideally the reverse proxy would
>even be portable across servlet engines and designed for exposure via
>JMX. [I say "designed for" as it seems everyone has their own way of
>actually /doing/ JMX MBeans -- Tomcat uses Modeler and others use
>something different. Me? I prefer just subclassing StandardMBean --
>but with my own value-add subclass thereof, of course :-)]
>jean-frederic clere wrote:
>> Sharmistha jat wrote:
>>> Dear All,
>>>
>>> I have applied for tomcat proxy project, but i needed a little more
>>> information than given in the project idea, to start with the design of
>>> proxy.
>>>
>>> So i would like to know more about the following:
>>>
>>> 1) Type of proxy [reverse,content filter,caching etc].
>>
>> Just a reverse proxy.
>>
>> For the content filter I think you mean soemthing like the ProxyPass
>> and ProxyMatch of httpd, do you? If yes some filtering would be nice.
>>
>> Caching is interesting but not a requirement for a reverse proxy (you
>> can have the static resource locally and server them locally).
>>
>>>
>>> 2) Use [intent]
>>
>> The use would be to front-end TC or cluster of TC. httpd does that but
>> the code is in C and it is a lot of work to have JAVA based
>> administration (JMX for example). The proxy should support HTTP and
>> HTTPS and could support AJP if you want.
>>
>>>
>>> I have studied a number of servlet proxies like j2ep, noodle & Http
>>> Proxy
>>> Servlet in past days.
>>
>>Could you write a wiki on that? (Somewhere in
>> http://wiki.apache.org/tomcat/).
i guess u mean writing wiki about proxy servlet
will give my best shot to it, but would borrow 3-4 days for the task.
>>
>> Cheers
>>
>> Jean-Frederic
>>
>>>
>>> And was puzzled about my intent of making proxy and its designing
>>> thereof.
>>>
>>> So, please guide me a little bit about this.
>>>
>>> Thanks
>>> Sharmistha
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org