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.
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.
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
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.
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