From owner-freebsd-java@FreeBSD.ORG Fri Mar 31 06:07:21 2006 Return-Path: X-Original-To: freebsd-java@freebsd.org Delivered-To: freebsd-java@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6F81F16A426 for ; Fri, 31 Mar 2006 06:07:21 +0000 (UTC) (envelope-from mv@roq.com) Received: from p4.roq.com (ns1.ecoms.com [207.44.130.137]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5613743D7E for ; Fri, 31 Mar 2006 06:07:08 +0000 (GMT) (envelope-from mv@roq.com) Received: from p4.roq.com (localhost.roq.com [127.0.0.1]) by p4.roq.com (Postfix) with ESMTP id 6985C4CAF5; Fri, 31 Mar 2006 06:07:31 +0000 (GMT) Received: from [192.168.46.101] (ppp166-27.static.internode.on.net [150.101.166.27]) by p4.roq.com (Postfix) with ESMTP id 8F9CA4CAB0; Fri, 31 Mar 2006 06:07:30 +0000 (GMT) Message-ID: <442CC709.50100@roq.com> Date: Fri, 31 Mar 2006 17:07:05 +1100 From: Michael Vince User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.7.12) Gecko/20060216 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Tim Diggins References: <442BA579.70509@red56.co.uk> In-Reply-To: <442BA579.70509@red56.co.uk> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV using ClamSMTP Cc: freebsd-java@freebsd.org Subject: Re: clearing up issues around jsvc or jakarta commons daemon X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Mar 2006 06:07:21 -0000 Tim Diggins wrote: > Hi - > > having googled and read around, there seems to be an approach to > jakarta commons daemon (jsvc) that I don't understand. There is no > FreeBSD port of it (there are darwinports and other OSX ports, however). > > The last discussion of this [1] simply states - "you must use .... > (apache + mod_webdav/mod_proxy/mod_jk)" -- no discussion of why... > > However almost all *recent* informed discussion in the tomcat world > suggests that one should never just blindly serve tomcat behind > apache, unless there is reason to - instead you serve your application > both ways, profile them both and choose the optimal solution (many > times standalone tomcat is more appropriate, even with lots static files) I seriously disagree, I have done extensive benchmarking using apachebenchmark 'ab' and other self developed tests and found that using proxy_ajp_module to seriously help performance sometimes by magnitudes of requests / sec for a Tomcat 5.5.x / Apache 2.2 setup Its very simple to do with the Apache2.2 server and you get all the extra power that Apache provides. Simply build apache with the proxy modules. Simply use the portupgrade -N -m 'WITH_MPM=worker -DWITH_PROXY_MODULES' /usr/ports/www/apache22 And put something like this in your Apache virtual host config Allow apache to pass over the servlets-examples to Tomcat. ProxyPass /servlets-examples ajp://127.0.0.1:8009/servlets-examples With this kind of setup you can can allow Apache to send static data directly offloading Tomcat to just work on dynamic data ProxyPass /images/ ! And use other Apache2.2 performance features such as mod_mem_cache for memory caching of static content to lower hard drive IO. |http://httpd.apache.org/docs/2.2/mod/mod_cache.html| With these kinds of settings believe it or not I am able to deliver 100s of millions of dynamic page loads a month on a single Pentium 4 server.