GlassFish Server Open Source Edition 3.1 - Rolling UpgradeThis page captures information for the rolling upgrade feature as part of the clustering support in GlassFish 3.1. IntroductionPart of clustering in 3.1 is support for rolling upgrade of applications. The GlassFish 2 documentation describes the procedure, which is mostly manual. GlassFish 3.1 simplifies some of the manual steps. The general flow of rolling upgrade in 3.1 is:
Role of Application VersioningGlassFish 3.1 supports application versioning which allows the administrator to deploy multiple versions of an application concurrently. At most one version of an app can be enabled at any given time. App versioning will simplify rolling upgrade. Suppose the cluster is currently running myApp:1.0 (version 1.0 of myApp). With app versioning support, the administrator can deploy the new version of the application in a disabled state, using a command like asadmin deploy --enabled=false --target myCluster myApp:1.1 Clustering's dynamic deployment support will deliver the new version's bits - in a disabled state as requested on the illustrated deploy command - to each instance to which the app is assigned if that instance is up at the time of deployment. And only the instance which are up at deployment time are the relevant ones during a rolling app upgrade. (Instances which are down when the administrator deploys the new app will synchronize with the DAS during instance restart.) When deployment finishes, each active instance has the preceding version of the app - which remains live - and the files for the new version. Remaining Rolling Upgrade StepsTo continue the rolling upgrade, for each live instance in the cluster which hosts the app, the administrator:
Key improvements over the 2.x scheme:
Questions/notes/issues:
Currently we have no similar restriction in the app versioning proposal. That is, we don't currently mandate that a new version of an app be deployed to the same target(s) where its predecessor is already assigned. I don't think we want to do that, because it seems like a valid use case to deploy one version of an app to one target and another version to another target (for testing, training, etc.). Instead, GlassFish 3.1 could warn if the user deploys a subsequent version of an app to a different set of targets from the set where it's already deployed. That would create "noise" in the example above - where the admin wants one version on one target and another version on another target - but the example would be allowed. And in the case where the administrator intended to hit the same targets but didn't the warning would alert him or her to that.
Some Implementation Notes
|