5 Replies Latest reply on Sep 25, 2006 3:18 AM by belaban

    Fail-over and fail-back behaviour with 4.0.4

    adriandcross

      I have a two node cluster and would like to ensure that node 1 is always the master whenever it is available. Currently, if node 1 is shutdown then node 2 quite correctly elects itself the master. However, when node 1 becomes available again it joins the cluster as a slave. How can I configure JBoss such that node 1 always elects itself as the master when it is available?

      Many thanks,


      Adrian

        • 1. Re: Fail-over and fail-back behaviour with 4.0.4
          pallam

          Hi sir , i am having problem with the following :

          I have 3 nodes : A(Node),B(Node),C(Node)

          say , node A is Master and remaining node B and node C are slaves.So whenever node A fails i need to join node B and if B fails node C.
          Can you help me how can i proceed... i am not having any idea .Please can you give some sample code(JAVA) .Or Can you give me the steps how to change any .XML or others.
          Thanq
          GopiKrishna

          • 2. Re: Fail-over and fail-back behaviour with 4.0.4
            adriandcross

            Hi. I haven't used a 3 node cluster so cannot help you with examples of configuration. However, from my reading around of the subject I would expect JBoss to fail-over to the oldest member of the cluster. For this reason the order in which you start your nodes will most likely effect the order in which nodes failed-over to. I might be wrong about this though.

            • 3. Re: Fail-over and fail-back behaviour with 4.0.4
              belaban

              That's currently not possible. However, we have a JIRA task which will externalize the master selection policy, so this will be possible in the future. Forgot the issue number, but if you search for this in Clustering you should find it

              • 4. Re: Fail-over and fail-back behaviour with 4.0.4
                adriandcross

                Many thanks. I will go and find the related issue. In the mean time, if I cannot control this behaviour it leaves me with problem that I'm finding tricky to solve. Perhaps you can help:

                My application uses an HASingleton to start certain activities on the master node. It is essential that these activities only occur on one node - hence the HASingleton. However - it is also essential that all web traffic to the application also goes to the master node only - never the slave. Do you know of an http fail-over solution that will ensure that all traffic is directed only to the master node? I.e - not a load balancing solution - pure fail-over.

                Thanks again,

                Adrian

                • 5. Re: Fail-over and fail-back behaviour with 4.0.4
                  belaban

                  Apache mod_jk plus JBossWeb (Tomcat inside of JBoss) would allow you to do this, but with some manual intervention:
                  - You have nodes 1 and 2
                  - Configure node 2 to be backup, so no traffic is sent to it (disabled=true in workers.properties)
                  - Configure node 1 to have node 2 as failover
                  - When node 1 crashes, all traffic will be sent to node 2
                  - HOWEVER, failback won't happen the same way. You would have to restart node 1 as 'disabled' and configure the failover node for node 2 to be node 1. This can be done with the /status/ application on Apache though