clgs
(Clgs Нету)
May 14, 2018, 9:57am
1
Hi.
We have three servers (A, B and C).
Server A must be made a master.
Servers B and C with slaves.
Server A:
node.master: true
node.data: true
node.ingest: false
discovery.zen.ping.unicast.hosts: ["A", "B", "C"]
Server B
node.master: false
node.data: true
node.ingest: false
discovery.zen.ping.unicast.hosts: ["B", "C", "A"]
Server C
node.master: false
node.data: true
node.ingest: false
discovery.zen.ping.unicast.hosts: ["C", "A", "B"]
When server A is turned off, then servers B and C are not available. This is normal?
A_B
May 14, 2018, 10:08am
2
If you only have one master
I think that is what happens.
Why can't B and C be masters?
rcowart
(Rob Cowart)
May 14, 2018, 10:14am
3
node.master: true
means that the node is "master eligible", not that it will be THE master. For a three node cluster you need...
Server A:
node.master: true
node.data: true
node.ingest: false
discovery.zen.ping.unicast.hosts: ["B", "C"]
discovery.zen.minimum_master_nodes: 2
Server B
node.master: true
node.data: true
node.ingest: false
discovery.zen.ping.unicast.hosts: ["C", "A"]
discovery.zen.minimum_master_nodes: 2
Server C
node.master: true
node.data: true
node.ingest: false
discovery.zen.ping.unicast.hosts: ["A", "B"]
discovery.zen.minimum_master_nodes: 2
2 Likes
clgs
(Clgs Нету)
May 14, 2018, 10:15am
4
Do the wizards B and C, and write data only on A?
It is assumed that A is RW, B and C are only R.
A_B
May 14, 2018, 10:16am
5
That is not what node.master
means... The master role has to do with managing the cluster nodes.
All nodes will be RW. And node.data
is what sets if documents are stored on the node or not.
1 Like
clgs
(Clgs Нету)
May 14, 2018, 10:16am
6
Or to make all servers node.master: true?
dadoonet
(David Pilato)
May 14, 2018, 10:19am
8
Even easier start your nodes with the only following configuration:
discovery.zen.ping.unicast.hosts: ["A", "B", "C"]
discovery.zen.minimum_master_nodes: 2
1 Like
Elasticsearch nodes form a cluster, it is not a master-slave architecture.
1 Like
A_B
May 14, 2018, 3:40pm
10
rcowart:
Server A:
node.master: true
node.data: true
node.ingest: false
discovery.zen.ping.unicast.hosts: ["B", "C"]
discovery.zen.minimum_master_nodes: 2
Server B
node.master: true
node.data: true
node.ingest: false
discovery.zen.ping.unicast.hosts: ["C", "A"]
discovery.zen.minimum_master_nodes: 2
Server C
node.master: true
node.data: true
node.ingest: false
discovery.zen.ping.unicast.hosts: ["A", "B"]
discovery.zen.minimum_master_nodes: 2
Is this config not a little bit dangerous? Not listing the "local" node in discovery.zen.ping.unicast.hosts
that is.
When ever any node goes down discovery.zen.minimum_master_nodes: 2
is not true anymore...
Say, node A goes down for any reason.
A can not be master (it is stopped)
B can not be elected master as it will need an answer from both C and A for who should be elected master
C can not be elected master as it will need an answer from both A and B for who should be elected master
I'm just curious... Maybe I don't know something about master election.
clgs
(Clgs Нету)
May 14, 2018, 3:55pm
11
dadoonet write:
discovery.zen.ping.unicast.hosts: ["A", "B", "C"]
discovery.zen.minimum_master_nodes: 2
rcowart
(Rob Cowart)
May 14, 2018, 4:37pm
12
No it doesn't need an answer from both of those. B already knows about his own configuration, he just needs to find another master eligible node and he is good to go. So as long as A or C are reachable (in you example C would be), there is a 2 node quorum and all is well. B doesn't have to send a unicast message to himself.
@dadoonet was just arguing in favor of consistency on all three nodes. Either way works.
system
(system)
Closed
June 11, 2018, 4:37pm
13
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.