7 Replies Latest reply on Apr 25, 2006 3:55 PM by Jerry Gauthier

    time to deploy in the cluster

    Emerson Cargnin Newbie

      Our server may take 1/2 hour to initialize all its subsystems. We are planning in using jboss clustering. At the moment, we make sure that just one server have the application deployed at each time, if used jboss clusters, how can we certify that all the servers won't be anavailable if they try to deploy the updated app in all the cluster?

      Emerson Cargnin

        • 1. Re: time to deploy in the cluster
          Brian Stansberry Master

          To have an app only deployed on one node in the cluster, deploy it in the /server/all/deploy-hasingleton directory. The app will only be deployed in the master (i.e. oldest running) node; if that nodes fails or is shut down it will be deployed in the next oldest node.

          • 2. Re: time to deploy in the cluster
            Emerson Cargnin Newbie

            Hi Brian
            thanks for answering, but the question was sort of misunderstood :)
            what happens is that I really want it to be deployed on all servers. The problem is that we have loads of services that are started on the app deploymen and if all the servers try to deploy at the same time the app will be anavailable for the time it takes to initialize the applications...


            • 3. Re: time to deploy in the cluster
              Brian Stansberry Master

              That would need to be handled by some kind of scripting you set up to roll the deployment out across your servers. Once something is copied to the deploy or farm directories, JBoss will deploy it. The only delayed-deployment option is the deploy-hasingleton folder I mentioned, which isn't what you need.

              • 4. Re: time to deploy in the cluster
                Emerson Cargnin Newbie

                ok, but the default behaviour is to deploy one at a time??? or if the app takes a long time it will be anavailable as long as it takes to start up?

                thanks a lot

                • 5. Re: time to deploy in the cluster
                  Brian Stansberry Master

                  Each server in the cluster deploys independently. If you start a server, once the app is deployed on that server and the server start is completed, the app is available on one node. As more servers finish their startup process, they (and the app) become available.

                  I think redeploy is a more significant issue. If at the same time you copy a new version of the app to the deploy dir of all the servers, it will be undeployed and redeployed on all the servers, and until redeploy is complete it won't be available. So, staggering the redeploys is an option to prevent this.

                  Suggest you experiment; that's the best way to learn what will happen. If deploying your app takes too long to experiment with, write a simple webapp that has a ServletContextListener that goes to sleep for 15-30 secs in the contextInitialized() callback. Then play around with different ways of deploying it on the cluster and observe what happens.

                  • 6. Re: time to deploy in the cluster
                    Dong Zhang Newbie

                    Here is a dummy question.
                    I installed full JBoss in XP.
                    My installation has server/default structure, is all just a replacement of default?
                    Also how to get farm directory?

                    Thanks a lot.

                    • 7. Re: time to deploy in the cluster
                      Jerry Gauthier Apprentice

                      "All" is a superset of "default", containing additional services including clustering support.

                      The Farm directory will be in your "all" server, not the "default" server as the latter doesn't support clustering.