-
1. Re: Cluster-HA-Singleton: Quorum only?
pferraro Jan 4, 2016 7:57 AM (in response to rbattenfeld)I don't fully understand your scenario. What is it that you are trying to achieve? You have some service that you only want running on a single node, but you don't ever want it to run on node3?
-
2. Re: Cluster-HA-Singleton: Quorum only?
rbattenfeld Jan 4, 2016 8:18 AM (in response to pferraro)Yes, exactly. This is a common pattern. Say the first two servers are really expensive big machines with tons of GB memory and cores. In order to achieve high availability we need a quorum which allows to avoid the split brain problem. And this server for the quorum can be a low end server with very low memory and cores setup.
Does this make sense for you?
-
3. Re: Cluster-HA-Singleton: Quorum only?
pferraro Jan 4, 2016 8:39 AM (in response to rbattenfeld)Why would you install the service on a node that you never want to run it?
Is not sufficient to specify a name preference for node1 and node2?
-
4. Re: Cluster-HA-Singleton: Quorum only?
rbattenfeld Jan 4, 2016 9:32 AM (in response to pferraro)It was just a question. I see in the code that the service and quorum is installed in different steps. So, my idea was to install just the quorum.
But if that is not supported or doesn't make sense then the current implementation is fine for me.
I am not sure what you mean with the name preference. This just selects the default node... It doesn't solve the split brain problem, right?
-
5. Re: Cluster-HA-Singleton: Quorum only?
pferraro Jan 4, 2016 1:56 PM (in response to rbattenfeld)I'm not sure what you mean by "install just the quorum". If you have 3 nodes, but you want only node1 or node2 to run your service, you can install it via:
factory.createSingletonServiceBuilder(name, service) .requireQuorum(2) .electionPolicy(new PreferredSingletonElectionPolicy(new SimpleSingletonElectionPolicy(), new NamePreference("node1"), new NamePreference("node2"))) .build(target) .install();