views:

60

answers:

2

So we have a busy legacy web service that needs to be replaced by a new one. The legacy web service was deployed using a WAR file on an apache tomcat server. That is it was copied over into the web apps folder under tomcat and all went well. I have been delegated with the task to replace it and would like to do it ensuring

  1. I have a back up of the old service
  2. the service gets replaced by another WAR file with no down time

Again I know I am being overly cautious however it is production level and I would like everything to go smooth. Step by step instructions would help.

+1  A: 
  1. Make a test server
  2. Read tutorials and play around with the test server until it goes smoothly
  3. Replicate what you did on the test server on the prod server.

If this really is a "busy prod server" with "no down time", then you will have some kind of test server that you can get the configuration right on.

bwawok
A: 

... with no down time

If you literally mean zero downtime, then you will need to replicate your webserver and implement some kind of front-end that can transparently switch request streams to different servers. You will also need to deal with session migration.

If you mean with minimal downtime, then most web containers support hot redeployment of webapps. However, this typically entails an automatic shutdown and restart of the webapp, which may take seconds or minutes, depending on the webapp. Furthermore there is a risk of significant memory leakage; e.g. of permgen space.

The fallback is a complete shutdown / restart of the web container.

And it goes without saying that you need:

  • A test server that replicates your production environment.
  • A rigorous procedure for checking that deployments to your test environment result in a fully functioning system.
  • A preplanned, tested and hopefully bomb-proof procedure for rolling back your production system in the event of a failed deployment.

All of this (especially rollback) gets a lot more complicated when you system includes other stuff apart from the webapp; e.g. databases.

Stephen C