Strange balancing in 3 node cluster

Hi people,

I have a 3 node cluster:

Node 1
node.master: true
node.voting_only: false
node.data: true

Node 2
node master: true
node.voting_only: false
node.data: true

Node 3
node.master: true
node.voting_only: true
node.data: false

My questions are these:

  1. The Node 3 (just master, not data) should be dedicated master or dedicated voting-only master ???

  2. When I see the shard distribution on both data nodes (nodes 1 and 2), I can see a shard balancind around 20%, I say Node 1 has 80% primary shards and 20% replica shards, and Node 2 has 20% primary shards and 80% replica shards. I've supposed the shard distribution should be 50% primary and 50% replica in each nodes. Can you explain to me?

Special thanks and greetings!!!

The most pressing problem with your cluster is that you only have 2 master eligible nodes so you should change this to make all off them master eligible. You always need at least 3 master eligible nodes in a cluster for HA.

Shards can be changed from primary to replica at any time to the distribution you describe is not at all problematic. Primary and replica shards generally do the same work.

Dear Christan, thanks for your help. You say I have to have 3 master eligible nodes with this settings:

node master: true
node.voting_only: false

Please a last question: when is suitable to use a master only-voting node ????

Regards!!!

One of the three can be a dedicated master node that is voting only but both data nodes also need to be master eligible. Read this for further details.

Christian, after reading the doc you sent me, I noticed I can have a two node cluster + a voting_only node (totally 3 nodes) because it's the smallest cluster we can have in production environment, as I have now:

Node 1
node.master: true
node.voting_only: false
node.data: true

Node 2
node master: true
node.voting_only: false
node.data: true

Node 3
node.master: true
node.voting_only: true
node.data: false

So is this OK? Because I have two master/data nodes + a tiebraker voting_only node. If tcommunication betwwen node 1 aand 2 is broken, the voting only node decide the master.

Thanks again!!!

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.