4

I have a JBoss AS7 cluster with 2 nodes. I am looking to 'update' my application with zero down time. [This application is not yet deployed in production it is in development stage]

In my case, in some scenarios I need to go for a unplanned deployment. This scenario can happen in some baseness logic change [This can happen once in a year or two, In all such cases there will not be no session structure update, no database structure change etc.]

Following are the configurations/steps in my plan to achieve this.

Configurations:

1.Session Replication is enabled.
2.Load balancing is done with Apache mod_jk.
3.JBoss AS 7.1 in standalone mode.

Steps:

1. Take out node1 from the cluster.
2. Deploy new war file in node1.
3. Attach node1 in cluster.
4. Take out node2 from the cluster.
5. Deploy new war file in node2
6. Attach node2 in cluster.

The time lag between step 3 and step 4 can cause inconsistency, because two versions of application will be up and running at the same time.

What are the other options to achieve the zero down time?

[This is a Spring based web application]

Thank You.

Sam
  • 554
  • 1
  • 12
  • 23
  • I moved to JBoss wildfly-8.0.0.Final with domain model. I could achieve the zero down time deployment with 2 server groups. The only drawback is, users whose requests are 'in process' will get an error 500. If the request processing is completed, this approach will work fine with session replication. By the way this requirement was not the reason to migrate to Wildfly. – Sam Oct 29 '14 at 06:08

2 Answers2

6

There are two typical approaches for zero down time deployment.

1. Blue-Green Deployments

The idea is to have two versions of production environments. Then you can switch the router to new enviornment. Or you can change DNS to point to new IP/CNAME(AWS Beanstalk uses this way) or IP swap (Azure cloud service uses this way).

enter image description here

2. CanaryRelease

This approach rolls out a new version to a subnet of the production servers firstly and routes to all users once you are happy to do so.

enter image description here

As for your case, it's more like CanaryRelease which you have two versions in the same time. If application version consistency matters for you, Blue-Green Deployments will be your choice.You can take out node2 and attach node1 at the same time so that it actually switches versions.

Wenbing Li
  • 12,289
  • 1
  • 29
  • 41
  • Question on step3 and step4: If I take out node2 and attach node1, in that case session replication will not be guaranteed. However if I attach node1 and take node2 out there may be options to guarantee session. Do you have have more idea on that so that I can force a session replication from node2 to node1 ? – Sam Aug 26 '14 at 05:10
0

easy-deploy does exactly that with one command.

Check this answer

Marcelo Lazaroni
  • 9,819
  • 3
  • 35
  • 41