Alex Rivera | Logout

Zero downtime deployment for Java apps

Asked 2010-12-16T14:53:33.153
15

I am trying to build the very lightweight solution for zero downtime deployment for Java apps. For the sake of simplicity lets think that we have two servers. My solution is to use:

  1. On the "front" -- some load balancer (software) - I am thinking about HAProxy here.

  2. On the "back" - two servers, both running Tomcat with deployed application.

When we are about to deploy new release

  1. We disable one of the servers with HAProxy, so only one server (let's call it server A, which is running old release) will be available.

  2. Deploy new release on other server (let's call it server B), run production unit tests (in case we have them :-) and enable server B with HAProxy, disabling server A at the same time.

  3. Now we have again only one server active (server B, with the new release). Deploy new release on server B, and re-enable it.

Any advises how to improve? How automate?

Any ready made solutions or do I have to end up with my own custom scripts?

Thanks!

Edit
Report

1 Answer

3

Have a look at the OSGi technology if you can accommodate an OSGi container since it provides good isolation and hot deployment for OSGi bundles. If you are using the Spring framework you could use Spring OSGi

answered 2010-12-16T15:12:57.633

Your Answer