5 Replies Latest reply on Jan 30, 2012 2:06 AM by Wolf-Dieter Fink

    JBoss Clustering

    Izauddin Mohd Isa Newbie

      Hello,

       

      I'm new to JBoss. I'm being tasked to deployed JBoss EAP 5 in cluster environment. I've been going through most of

      the documentation that I can find related to the JBoss clustering. I know how to deployed cluster, hv deployed a few

      but mainly infra cluster using external load balancer and cluster like Oracle RAC.

       

      I want to deployed a load balance JBoss in two server and balanced by an external load balancer. The external load

      balancer will be two HAProxy server to avoid a single point of failure to the load balancer. Is there any references to

      deployed JBoss with external load balancer ?

       

      I also has some question regarding the JBoss clustering.

       

      1. What are the benefits / advantage running multiple JBoss instance in a single server (cluster and non-cluster)

           If the server is down / hardware failure won't all the JBoss application will not available ?

       

      2. What is the difference between mod_jk,mod_cluster and mod_proxy ?  In what situation / environment we need

           to use which one ?

       

      3. If there is no external load balancer, in a two server setup, I'm I correct to assume that the JBoss is being load balance

          by a web server that running the cluster mod_ ? server as the front-end, in both server and manage the load balance ?

           How this two server know if the other server is down ? Multicast ? Cos the one that I usually deployed will have a connection

           between the node to check each other node alive or not.

       

      4. I've have gone through most of the JBoss documentation, but did not found out a detail deployment secnario for clustered

           JBoss.

       

      Do point out to me the necessary reading material, if I missed one. Thank in advance for any info provided.

       

      Rgds

      Din

        • 1. Re: JBoss Clustering
          Wolf-Dieter Fink Master

          You should provide what application do you will run. Is it a EJB or a WEB application? How do you access it?

           

          For web applications you might use external load balancer and/or mod_*** (I'm not very familiar with this may other have an answer for you)

          For EJB there is no need for loadbalances, the JBoss-proxy will have this functionality

           

          1)

          Benefit of running two instances on one single machine is that you have two different Java VM's, in case of 32bit VMs you might able to use more memory.

          Also you spread some load accross two VMs, it depend to the application and load whether this will make sense, you should test it!

          In case of JVM crash or planed restarts it will avoid a complete downtime.

           

          4)

          I think you will not find a cook book in detail, it depend on your requirements.

          If you have many single http requests a lot of independent (non clustered) server may best

          If you need failover seesions a cluster will be the solution.

          I've seen many different solutions that will work for exact one scenario.

          If you describe a bit more the community may have a better idea and can give you some hints.

          1 of 1 people found this helpful
          • 2. Re: JBoss Clustering
            Izauddin Mohd Isa Newbie

            Thanks for shedding some light on the matter. It's will be running a web application. The user will access

            it through a web browser pointing to a url / hostname. Basically it will running a web based application.

            The user / client will be pointing to a url / hostname where the haproxy will load balance it between two

            server running JBoss EAP. The HAProxy will also be providing a failover services if one of the JBoss

            application server is down or doing maintenance.

             

            The HAProxy loadbalance server will be deployed in two server to avoid a single point of failure at

            the loadbalancer. This will running heartbeat (Linux-HA), in order to provide a single ip address / virtual

            hostname for the JBoss apps server.

             

            To the user / client, they see / connect to one server, but at the back there is two JBoss server , serving

            the request. sharing session (I guess this will be http session replication), sticky session and application

            deployment.

            • 3. Re: JBoss Clustering
              Izauddin Mohd Isa Newbie

              Hi guys,

               

              Additional question;

               

              1. If there is no external load balancer or an external proxy in front of a two server (node) JBoss cluster, how the user will access the

              JBoss web application. Said that I have two server running JBoss for a web application access, to configure JBoss built in

              cluster, I should use one of the mod_* (either proxy,jk,cluster) running on the web server on both of the node.

              Surely there will be two server name and two ip addresses, but the end user will use only 1 hostname / ip address to

              access the JBoss web application, do this cluster plugin / mod maintain some sort of server name / ip address take over

              and keepalive (heartbeat) to make sure that the hostname / ipaddress that the user access will always be alive in case of

              one of the server down ?

               

              Thanks in advance for any information provided.

               

              Rgds

              Din

              • 4. Re: JBoss Clustering
                navuri prasad Newbie

                Hi guys,

                 

                               I'm able to run two different nodes in same system and its working fine.i'm  using below commands to run different nodes

                 

                 

                run.sh  node1 -Djboss.service.binding.set=ports-01  -u 224.13.15.5 -c all -b 0.0.0.0 -Djboss.messaging.ServerPeerID=1

                 

                 

                 

                run.sh  node2 -Djboss.service.binding.set=ports-default -u 224.13.15.5 -c all -b 0.0.0.0 -Djboss.messaging.ServerPeerID=2


                 

                 

                I have tested sending request its working fine if and only if change the port number in URL.

                 

                 

                EX:http://loclhost:8080/test/testServlet

                      http://localhost:8180/test/testServlet

                 

                 

                Manually I'm changing port numbers.Please let me know any another approach is there.

                 

                Thanks in advance.

                • 5. Re: JBoss Clustering
                  Wolf-Dieter Fink Master

                  Hi Navuri,

                  first of all your post is different to the original post, in that case you should open a new thread for your questions.

                   

                  To answer your questions, a common way is to use the -b option with different (virtual) IP addresses. in that case you can drop the 'jboss.service.binding.set' option all instances work with the same port numbers but a different IP.

                  It depend on the OS how to configure the IP's.

                  If you have additional questions here please open a new thread.