Search code examples
cratecratedb

Crate DB 2 Node Setup


I'm trying to setup a 2 node Crate cluster, I have set the following configuration values on the 2 nodes:

gateway.recover_after_nodes: 1
gateway.expected_nodes: 2

However the check is failing as per the documentation:

(E / 2) < R <= E where R is the number of recovery nodes, E is the number of expected nodes.

I see that most available documentation states a 3 node cluster, however at this point I can only start a 2 node cluster as a failover setup.

The behaviour I'm expecting is that if one of the nodes goes down the other node should be able to take up the traffic and once 2nd node comes back up it should sync up with new node.

If anyone has been able to successfully bring up a 2 node Crate cluster, please share the configuration required for the same. Cheers


Solution

  • It doesn't make sense to run a two node cluster with 1 required node, because this could easily end up in a split brain and set the cluster into a state that it won't be able to recover, that's why you always need more then half of the number of expected nodes.