On Wed, 21 Aug 2002, Zhenxin wang wrote:

> Date: Wed, 21 Aug 2002 19:26:09 -0700
> From: Zhenxin wang <[EMAIL PROTECTED]>
> Reply-To: Tomcat Developers List <[EMAIL PROTECTED]>
> To: Tomcat Developers List <[EMAIL PROTECTED]>
> Subject: make a proxy cache server out of tomcat
>
> Hi,
>
> I am thinking of using tomcat to build a proxy cache server.  When a
> request comes into the proxy cache server, the server checks to see if
> the app is deployed in the local container. If yes, the request is
> served by the proxy cache server. If not, the proxy cache forwards the
> request to the origin server and get the response.
>
> I wonder does current Tomcat code base have the request forwarding logic
> or not? If not, where can I get an open source java code for the request
> forwarding logic.
>

There is nothing to do proxy forwarding in the current Tomcat code base,
but in principle you should be able to implement this in a web application
(and portable across servlet containers, for that matter).  When I had
more time to play around with code, I wrote about 50% of such a proxy
webapp, with the thought of proposing it as a jakarta-commons project, but
alas have never had time to finish.  The biggest technical challenge is
deciding what API to use for the forwarded HTTP connections -- I found
java.net.HttpURLConnection to be too flaky in how it deals with some of
the error cases, and was starting to look at commons-httpclient.

One interesting thought -- if we had such a proxy webapp available, it
could also be the basis for a pure-Java solution that does load balancing
between back-end Tomcat instances, just like the current support in
mod_jk.  Or, a step beyond that, you could implement automatic failover.
Or an edge-side server that automatically updated its cached data on some
periodic schedule.  Or ...

> Thanks!
>
> --Zhenxin Wang
> DoCoMo Labs USA
>

Craig



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to