javacluster-computingjgroups

How do I force JGroups which node to make coordinator?


I'm looking for a way to force JGroups to use a specific server as the Coordinator, and if that server isn't present, elect a new Coordinator until that one specified rejoins the cluster and it takes over being the Coordinator.

In this case, we have some information we push in to the cluster by the Coordinator listening to a Topic for updates, however fetching & processing those updates can be resource intensive so we don't want it to server anything to the outside world. So in the load-balancer in front of the cluster, we have it set to not send to the coordinator. But because the Coordinator is elected randomly, we basically need to shut down the cluster until only the single machine is in there and then start the rest of the cluster back up.


Solution

  • Currently there is no way to do this. Jgroups has spent considerable time making sure that the coordinator can be any of the nodes in a group. All tasks that maintain and monitor the health of the group membership list are shared among all of the members in the group to make sure that the coordinator duties do not affect the performance of the coordinator too much. The standard GMS (Group MembershipService) protocol stack class is what is responsible for the coordinator selection. Currently it is just the first host in the view list.

    To get this behavior, you are going to have to implement your own protocol stack. Others may have taken a whack at this issue however. I would recommend posting on the jgroups mailing list and asking the same question.