Zero downtime deployment for Java apps

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!

13
задан Ravindra babu 24 December 2015 в 13:26
поделиться