Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Deploying an application without undeploying previous one and with no downtime?

I use Glassfish Java, and JSP over MySQL for my web applications. Many online people uses this web application and that web-site should not be down.

When I want to deploy a new war file, I should undeploy and deploy the new one for my application at server.

My question is that;

Is there any technology that doesn't need to undeploy my application and just change the appropriate classes so no need to redoploy it again?

like image 450
kamaci Avatar asked Apr 12 '11 08:04

kamaci


1 Answers

There are java technologies that would allow you to replace classes on the fly (like JRebel). But since you're using Glassfish already, you should just start using clustering which is built into glassfish. You'll need either 2.1 or 3.1, as 3.0 does not support clustering. With a Glassfish cluster, you have a load balancer (Apache, Sun Web Server, hardware (Big IP, Coyote), etc) distribute the load among your cluster nodes. When you want to upgrade the app, you can technically do it one node at a time. Setting up the cluster is not the easiest thing in the world, but it is doable and it would get you some great benefits. You'll be able to scale the load by adding new hardware and even using Amazon (or whoever) cloud services. You'll be able to keep your site running even if the hardware fails on one of the nodes.

Personally I'm in the middle of converting from Glassfish 2.1 to 3.1. So far I like the management of the Glassfish 3.1 cluster much better, but I can't personally vouch for how it will run in production, though I have high expectations.

http://download.oracle.com/docs/cd/E18930_01/html/821-2432/gktqx.html#gktob

like image 127
Jim Avatar answered Sep 28 '22 04:09

Jim