-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Farkas,
On 8/29/12 11:08 AM, Farkas H wrote: > I'm checking caching possibilities. Setup: Users send requests via > http-post with embedded http-get requests to a Tomcat web server. I > don't want to touch this for the moment. Sounds insane. > Tomcat sends the embedded http-get requests to remote servers, > receives the requested data, processes the data and returns the > result. That's called "being a proxy", and Tomcat isn't the best tool for that job. > I want to cache the data of the remote servers with Squid Proxy. Er, okay. > I think it's necessary to redirect the http-get requests from > Tomcat to Squid. First, you can't (properly) redirect a POST, so redirecting the client from Tomcat to Squid doesn't make any sense. I think what you mean is that instead of Tomcat (really your proxying-webapp) contacting the back-end server directly, you want to contact Squid instead. That's easy: use the hostname/IP address/whatever where Squid lives instead of contacting the backend server directly. > I would say Squid should be behind Tomcat and not in front of it > like a reverse proxy ... but I'm not a specialist. Obviously not. > Could this work? So you have: Client -> Tomcat -> "remote servers" and you want: Client -> Tomcat -> Squid -> "remote servers" If "remote servers" is well-defined (like you are always contacting the same set of servers), then you'll be fine. If you need to proxy the entire Internet (which I suspect is the case), then you are boned unless you want to double-proxy, which is just silly in this case. Can't squid perform the response mutation that you desire? Why do you even need Tomcat in the mix? > If so, is it a good idea to redirect the Tomcat http-get requests > to Squid? How? I gratefully appreciate any advice. Perhaps you mean "forward" and not "redirect", but then your Tomcat instance is not actually doing anything, right? - -chris -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.17 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Mozilla - http://www.enigmail.net/ iEYEARECAAYFAlA+ZQ0ACgkQ9CaO5/Lv0PBJOQCeLRLSHEWiPth23zhaKHpgmtzx /WcAnAhaP0pm2VtKA0TNvJ7iPmwviRuM =Ixoa -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org