On Tue Mar 04 16:53:40 CET 2008 Tomcat Users List <users@tomcat.apache.org> wrote:
I apologize if this has been asked before or if it's mentioned in a FAQ (that I haven't found yet) but what are the best practices for deploying webapps across a cluster? The situation I will soon have is 6 application servers running Tomcat 5.5 and the manager webapp, each able to mount a filer over NFS. The build/deployment tool in use is Maven 2.x. Should I: a) Put the WAR files on the filer and just set up contexts like this <Context path="/foo" docBase="/path/to/wars/on/the/filer/foo.war"> On a new release, overwrite the foo.war and reload the context on all the app servers or b) Put the WAR files on local storage on each app server and use M2's cargo plugin to redeploy the WAR file on each release? c) Other? - Juilan
Hi, This sounds very reasonable. I would restart the Tomcat completely in stead of reloading. Depending on some (mis-)used singleton-patterns in third party libs you might get OutOfMemoryError in PermGen space after a couple of reloads, because some classes stay loaded. I save my .WAR file on NFS and than trigger a script on every server, which copy's the .WAR in the rights spot and stops and start Tomcat one after the other, so the cluster remains up. Ronald.