Monday, March 18, 2013

Zero Down Time Deployment Technique: Versioned Re-Deployment

Recently we tried out an experiment about Web Logic's production redeployment strategy involves deploying an updated version of an application alongside an older version of that same application in Local Server.
Scenario:
Consider the following scenario, we have an Monitoring_Application which used to monitor weblogic servers, terracotta servers and Unix Servers.
Which have two versions,
Monitoring_Application(v1) -> Gold1 Color Background -> Old Version
Monitoring_Application(v2) -> Cadet Blue4 Color Background -> New Version
Simple flow of Versioned Redeployment:
clip_image002[4]
WebLogic Server automatically manages client connections so that only new client requests are directed to the new version of the application. Clients already connected to the application (clients that already have an HTTP Session object) during the redeployment continue to use the older version of the application until they complete their work, at which point WebLogic Server automatically retires the older application.
clip_image002
Versioned Deployment (V1):Gold 1 Background
clip_image002[8]
Accessing the Versioned Deployment(V1):(Gold 1 Background)
clip_image002[10]

Versioned Deployment (V2):(Cadet Blue4 Color Background )
When we deploy the Version 2 of Monitoring_Application initially it will go to prepared state as usual and once we start "Servicing all requests" then,
V1 -> Go to Stop running state
V2 -> Go to Active State
clip_image002[12]
clip_image004
In Firefox:

Browser Firefox which having the HTTP Session object ,still serve the V1 Monitoring_Application.
clip_image002[14]
In Internet Explorer:

At the same moment if we opened the same URL in some other browser like(IE), we could able to access the V2 Monitoring_Application.
clip_image002[16]
Retired Stage:

Once all the HTTP Session object cleared, then the old application automatically goto retired state.
clip_image004[6]
Remove Old Version:

Once the old(v1) Monitoring_Application moved retired state then we can remove it from console.
clip_image006
This is an excellent feature from Oracle, I thoroughly enjoyed implementing it in one of our application.
If there is a need then you can implement it in your application to.

No comments:

Post a Comment