• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

How to upgrade applications with minimal or no downtime?

 
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All

We are developing public web portal in J2EE mainly using JBoss-5 as application server. There will be periodic updates and deployment of the same on server (most probably weekly) .

We need to have Zero or Minimum downtime for users accessing this portal, particularly, the existing user connections should not be broken. What are different scenarios that can occur and best practices to handle these types of periodic deployments. Appreciate your help.

Thanks
Neelesh
 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

the existing user connections should not be broken


That is currently not possible. When you "update" your app, the old version is undeployed, breaking all existing user connections, and the new app is deployed.

Also, if you plan to redeploy often, make sure you monitor the perm gen usage. Unfortunately, sometimes all of the classes for the old version of the app are not released when the app is redeployed, thus causing the permgen to grom in size. Once it gets near the maximum size you should do a reboot to clear it out.

You might want to monitor the app's usage and determine when it is quietest and do your redeploy/reboot at that time, thus impacting the least number of users.
 
Ranch Hand
Posts: 1871
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

How many instances of the Server do you plan to have. From the discussion above it seems only one.

However there are some ways of doing this if you have the Apache -> Jboss stack in place with many jboss instances.


Br
Rahul
 
Saloon Keeper
Posts: 28762
211
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
When you redeploy an app, that app gets stopped and restarted. If you want no downtime at all that means you'd need a clustered configuration. In that case, you would quiesce the app being updated (meaning that it would accept no new sessions), shut it down when all existing sessions are gone (or shift them in the cluster), then restart the new copy of the app. This is one reason why REST is so popular these days. It's an architecture that's more conducive to clustered servers.

Peter's reference to PermGen issues seems to be a relatively recent problem with Tomcat, and unfortunately, once the PermGen space runs out the entire Tomcat server has to be stopped and restarted, not just the application being redeployed.
 
Rahul Mahindrakar
Ranch Hand
Posts: 1871
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

In that case, you would quiesce the app being updated (meaning that it would accept no new sessions)



How is this done ?

 
Tim Holloway
Saloon Keeper
Posts: 28762
211
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Rahul Mahindrakar wrote:

In that case, you would quiesce the app being updated (meaning that it would accept no new sessions)



How is this done ?



There are a number of ways. They tend to either require special equipment or software or to require writing the app in a way that it can be instructed to refuse new sessions. One tricky thing about J2EE is that you don't have to be logged in to have a session, however. A simple getSession(true) is sufficient.

For zero downtime, you need a cluster and a mechanism that will permit the node that's being upgraded to refuse in such a way that other nodes are offered an opportunity to accept.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic