New cluster best practice - discovery.zen.ping.unicast.hosts:

Hi

I am building the below cluster

3x dedicated masters
3x dedicated data nodes
1x coordinator node

In the setting - discovery.zen.ping.unicast.hosts:

Do I only put the 3x dedicated masters, or shall I put the IP's of all the nodes in the cluster?

This is not really explained what needs to go in here, is it every node in the cluster, or just the masters?

You need to add the three IP address on each node you have elasticsearch installed. This will make all the three nodes to cluster.

Hi

Elastic search is going to be installed on all 7 Nodes. However only 3 of them are going to be dedicated master.

Are you saying I only need to put the masters IP's in the config for all 7 nodes?

Yes, including the other 4 nodes since you have Elasticsearch on each of the 7 nodes.

I am slightly confused.

Here - https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-discovery-settings.html

It says only a list of mater eligible nodes, not all the nodes in your cluster.

Which to me reads as only put the 3 master nodes in the list, but do this for all 7 nodes. Is that correct?

Pretty much, yes. Perhaps it helps to think of it this way: every node needs to be able to find the master node when it starts up, and the best way to ensure it can do so is to give the node a list of every master-eligible node, because this list must include the address of the elected master. You can give it more addresses and it'll still work, but it's a bit less efficient as it needs to check a lot more addresses before it finds the master. It's also a pain to keep such a list up-to-date as your cluster grows, and it's unnecessary because master-ineligible nodes are irrelevant to the process of finding the master.

On the master-eligible nodes themselves you technically don't need to include the node's own address in the discovery.seed_hosts list, but we generally recommend doing so anyway: it's simpler and less error-prone to have the same list on every node.

Hi

Thanks for the clarification.

The other question I had, which is kinda related. is in the Logstash output -

output {
elasticsearch {
hosts => ["localhost:9200"]
index => "logs-%{+YYYY.MM.dd}"
document_type => "logs"
}
stdout { codec => rubydebug }
}

Which elastic node IP do you put in? One of the masters? Or a list of the masters? Is it the same, or different?

That setting should be a list of the addresses of the nodes you want to coordinate the indexing of the data coming from Logstash. All nodes have the ability to do this, but generally you want to avoid using the master nodes for anything involving actual data like this.

Hi,

So, this would be the list of the 3x dedicated data nodes?, for example.

That should work, yes.

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