Closed cburman01 closed 6 years ago
What strategy are you using?
libcluster is:
Elixir.Cluster.Strategy.Epmd,
swarm is:
distribution_strategy: Swarm.Distribution.StaticQuorumRing, static_quorum_size: 2
In that case, try setting the quorum size to 1, if you want to have a functioning "cluster" with one node.
The definition of the quorum size:
It defines the minimum number of nodes that must be connected in the cluster to allow process registration and distribution.
So Swarm's behaviour seems fine to me in this case.
Ah, beat me to it @arjan. As he said, you are getting the expected behavior. You told it you needed 2 nodes to perform any actions, you went below two, so it stops actions from being taken.
Or you can just use the Ring strategy instead.
For more info @cburman01 go here: https://github.com/bitwalker/swarm#swarmdistributionstaticquorumring
Thanks @beardedeagle and @arjan! It works exactly as expected now.
@bitwalker What would you suggest is the best way to handle this. When using a 2 node cluster, when 1 of the nodes goes down I would expect the state and processes to move to the other node.
Instead I guest this:
I know swarm is pretty much useless with 1 node, but in my case, the cluster could drop to just 1 node.
Thanks for your help.