How to manage Tomcat release/deploy to have least downtime with Tomcat6
I realize Tomcat7 has the feature of parallel deployment, but I was not able to use it because it seemed to have some bugs on Linux so I had to downgrade to Tomcat6.
What I am wondering is how to set up a deploy process so that the site experiences the least downtime. In the past whe开发者_StackOverflow中文版n I deployed .war files, it created downtime during the upload and the reboot of Tomcat.
Is there any way to minimize the deploy-related downtime?
Thanks, Alex
Another way is:
Change the name of the file when you upload it
Stop tomcat
delete old war and expansion
rename new war to correct name eg ROOT.war
start tomcat
P.s: Sometimes it allows you to delete and rename files without stopping tomcat. In that case you can do the delete-rename operation and just restart tomcat at the end
Upload your app to a new directory, then shut down tomcat, point the context to the new directory, and restart. You still have the container start up time, but you don't have the downtime with uploading the app. It also doesn't have to explode the WAR for you during startup.
精彩评论