users@glassfish.java.net

Separate deployments into each node of cluster - advisable?

From: <glassfish_at_javadesktop.org>
Date: Wed, 23 Jan 2008 02:12:37 PST

Hi,

Having just launched our application to the public, we are still in stabilization mode and sometimes we come across a showstopper corner case during the day. The fix is usually pretty trivial and we are ready with a patch within an hour of discovery. However, it is difficult to obtain approval for deployment downtime of even 3 minutes and on a clustered environment, deployment takes as long as 5-7 minutes (2-3 minutes to undeploy existing EAR and 3-5 minutes more to deploy the new one). Precompiling JSPs may already take up to a minute or so. Usually my deployment command line looks like this:

$GLASSFISH_HOME/bin/asadmin undeploy --target=my-cluster my-ear-RELEASE-V1.02-20080123-0100; $GLASSFISH_HOME/bin/asadmin deploy --availabilityenabled=true --precompilejsp=true --enabled=true --target=my-cluster /tmp/my-ear-RELEASE-V1.02-20080123-0400.ear

After reading the deploy options more carefully, I figured that I can do a staggered deployment into each node (assuming 2 nodes in a cluster) like the following:

$GLASSFISH_HOME/bin/asadmin undeploy --target=my-instance-01 my-ear-RELEASE-V1.02-20080123-0100; $GLASSFISH_HOME/bin/asadmin deploy --availabilityenabled=true --precompilejsp=true --enabled=true --target=my-instance-01 /tmp/my-ear-RELEASE-V1.02-20080123-0400.ear
$GLASSFISH_HOME/bin/asadmin undeploy --target=my-instance-02 my-ear-RELEASE-V1.02-20080123-0100; $GLASSFISH_HOME/bin/asadmin deploy --availabilityenabled=true --precompilejsp=true --enabled=true --target=my-instance-02 /tmp/my-ear-RELEASE-V1.02-20080123-0400.ear

Can anybody advise if this is a good idea (practically speaking), considering the shared sessions which may run out of sync temporarily (I can imagine scenarios where session variables become invalid in a new deployment or even cause an error).

The SJSAS cluster is fronted by a SJSWS running in load balanced reverse proxy mode.

If this works out, it would save me and the help desk a lot of pressure from clients who are bumping into the bug during the entire day when we could have put in the fix early that morning itself.

Thanks!
Wong
[Message sent by forum member 'lilwong' (lilwong)]

http://forums.java.net/jive/thread.jspa?messageID=255285