zokratez
(Juli Zanuy)
October 28, 2015, 2:13pm
1
Hi!
I want to know if with this current schema I'm safe from split brain error...
Node1: master and data
Node2: slave and data
Node3: dedicated master
Node1 unicast point to Node2
Node2 unicast point to Node3
Node3 unicast point to Node1
Node1:
cluster.name: elasticsearch
node.name: "node1"
node.master: true
node.data: true
discovery.zen.ping.multicast.enabled: false
discovery.zen.ping.unicast.hosts: ["node2"]
discovery.zen.minimum_master_nodes: 2
Node2:
cluster.name: elasticsearch
node.name: "node2"
node.master: false
node.data: true
discovery.zen.ping.multicast.enabled: false
discovery.zen.ping.unicast.hosts: ["node3"]
discovery.zen.minimum_master_nodes: 2
Node3:
cluster.name: elasticsearch
node.name: "node3"
node.master: true
node.data: false
discovery.zen.ping.multicast.enabled: false
discovery.zen.ping.unicast.hosts: ["node1"]
discovery.zen.minimum_master_nodes: 2
The node api show:
node1 127.0.0.1 43 16 9.64 d m node1
node3 127.0.0.1 6 11 0.15 - * node3
node2 127.0.0.1 38 38 1.95 d - node2
And all the indices are green.
Anyway... It this configuration a risk to my cluster? Can be better?
Thanks!
You wont get the split brain problem.
But running with 2 masters is just as bad as running with just 1.
If one of your master nodes fails, the "minimum master node: 2" will make the other nodes unable to form a cluster.
i would suggest using three master nodes and leaving the minimum setting as it is.
I would also recommend to include all nodes in the unicast.host config
zokratez
(Juli Zanuy)
October 28, 2015, 2:37pm
3
Thank you for the tip. I change the config to:
Node1:
cluster.name: elasticsearch
node.name: "node1"
node.master: true
node.data: true
discovery.zen.ping.multicast.enabled: false
discovery.zen.ping.unicast.hosts: ["localhost", "node2", "node3"]
discovery.zen.minimum_master_nodes: 2
Node2:
cluster.name: elasticsearch
node.name: "node2"
node.master: true
node.data: true
discovery.zen.ping.multicast.enabled: false
discovery.zen.ping.unicast.hosts: ["localhost", "node1", "node3"]
discovery.zen.minimum_master_nodes: 2
Node3:
cluster.name: elasticsearch
node.name: "node3"
node.master: true
node.data: false
discovery.zen.ping.multicast.enabled: false
discovery.zen.ping.unicast.hosts: ["node1", "node2", "localhost"]
discovery.zen.minimum_master_nodes: 2
Is necessary put self host as localhost into unicast host array list?
No, i think you can leave out the localhost. But all other nodes are important.
Looks good to me
1 Like
warkolm
(Mark Walkom)
October 28, 2015, 9:48pm
5
You're better off having all 3 as master eligible and keeping min masters at 2.
Cause if you lose one master node now, your cluster will be unavailable.
1 Like