Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 440
Drizzt321 Avatar asked May 31 '12 22:05

Drizzt321


2 Answers

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. Interestingly, I've been working on a protocol stack for Jgroups which implements approximately what you are asking for however it is not ready for prime time.

Others may have taken a whack at this issue however. I would recommend posting on the jgroups mailing list and asking the same question.

like image 98
Gray Avatar answered Nov 14 '22 22:11

Gray


Just stumbled across this post. There is a simple&standard way to do this in JGroups: [1]. It essentially let's user code control view generation.

[1] http://www.jgroups.org/manual4/index.html#MembershipChangePolicy

like image 35
Bela Ban Avatar answered Nov 14 '22 21:11

Bela Ban