-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Uma,
On 3/3/2009 9:00 PM, uma...@comcast.net wrote: > We have a bunch of web applications packed into a single VM tomcat (6.0.14). > I am looking to segregating the contexts in distinct VMs based on IP address > based virtual hosts. If you want different apps in different JVMs, then you'll have to put something "in front" of those Tomcat instances in order to direct traffic. It could be a special Tomcat instance, or Apache httpd, or some other web server, or even a smart load balancer. If you want a Tomcat-only solution, you'll need to do one of two things: 1. Proxy the requests yourself (yuk!) 2. Redirect requests to the other Tomcat instances running on different ports (this would be your "URL rewriting" strategy, maybe?) The problem with #2 is that the port must be available to the outside world. That's easy enough on the server side, but lots of firewalls disallow /outbound/ traffic to ports other than 80, 443, and maybe a handful of others. I think you will build a lot of infrastructure and end up with many clients who cannot connect. I wouldn't recommend #1 because writing proxy code just sucks. Why not use someone else's? The "someone else" I would recommend is the fine folks you bring you mod_jk (or mod_proxy_http) for Apache httpd. We run httpd out in front of 4 separate JVMs running single-webapp Tomcat instances and we couldn't be happier. > I assume that to keep this segregation transparent to the applications > themselves, > URL rewriting has to be incorporated (if there is another method, pl let me > know). You need to be clear about "URL rewriting", because it's not a universal term. Ask most servlet/JSP programmers and they'll tell you it's a technique to encode session ids in URLs. Ask an Apache httpd hacker (I'm looking at you, André), and they'll tell you that mod_rewrite can do anything at all (and it really can!). Both kinds of people listed above haunt this mailing list. Generically, "URL rewriting" simply means "changing the URL" but doesn't specify how to do it or what happens when you do it. Just make sure you are being clear what you mean when you use that phrase. > 3) I assume that we would have to use a dummy webapp to rewrite the URL > based on virtual host configuration and forward the request. Is there a > better way? Do you mean redirect? You can't forward requests to another JVM unless you proxy (and then it's called proxying, not forwarding). - -chris -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkmumhMACgkQ9CaO5/Lv0PCwkwCgnVZT12ItqJAO4Qau217FyEJY 4V4AnAtrLoeCXivb0L8zWBkBpRd0MeUL =pzw/ -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org