Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Tomcat7 parallel deployment feature: experiences using it on production servers? [closed]

I've recently learned about Tomcat 7's feature to allow multiple versions of the same webapp deployed at the same time:

http://www.tomcatexpert.com/blog/2011/05/31/parallel-deployment-tomcat-7

http://www.javacodegeeks.com/2011/06/zero-downtime-deployment-and-rollback.html

Our sites regularly get 10-20,000 user sessions per day, and quite a lot of them are transactional/stateful type of webapps. Parallel deployment seems perfect for what we want, but I haven't really heard much about people's experiences using it on their servers.

If you use this feature of tomcat 7 in production, have you had any issues with it so far? Have you had to make any changes to your webapps to "play nice" with this Tomcat feature?

like image 983
trafalmadorian Avatar asked Oct 05 '11 06:10

trafalmadorian


2 Answers

I didn't use this feature in production. My first thougths are:

  • What if you apply database schema changes? You'll have two applications running on same schema with different database handling (for example different JPA entities).
  • What if you have some scheduled tasks? They'll run paralell. Your application must be ready for this.
  • What if you apply some very important bugfixes? You'll have good and buggy application running together. They'll together make changes to database until all old sesions expires.
  • Why do you want your users to see old version of an application if you apply some new features or bugfixes.
  • Your application must be prepared the same way you prepare it to run on cluster with sticky sessions. It's just the same, but on same Tomcat.
  • Are you sure your application can be redeployed on Tomcat without well-known perm gen issues? I heard they say it can be done now. I still restart Tomcat with each redeploy.
like image 175
Piotr Gwiazda Avatar answered Nov 14 '22 16:11

Piotr Gwiazda


We didn't have much luck getting this to work consistently in our test environment, so no way we'd consider it for production.

The question is, do you need the ability to do hot upgrades in your environment? Often this is theoretically nice but not needed.

like image 36
SteveD Avatar answered Nov 14 '22 15:11

SteveD