To use or not to use NodeSelector.SKIP_DEDICATED_MASTERS with high level rest client

Hello,

The documentation is slightly unclear in regards to using NodeSelectors for the rest client.

We have a cluster with dedicated master-eligible nodes and dedicated data/ingest nodes. It seems that with this configuration, the suggestion is to set NodeSelector.SKIP_DEDICATED_MASTERS on the rest client when building it so that all requests round-robin between the data/ingest nodes and not the master-eligible ones.

However, there is this page in the documentation that says "This is useful when sniffing is enabled, in case only dedicated master nodes should be hit by HTTP requests", which seems to contradict this page in the documentation that says "This is useful for instance to prevent sending requests to dedicated master nodes when sniffing is enabled".

Additionally, there is this page in the documentation that says "The master node is responsible for lightweight cluster-wide actions such as creating or deleting an index...", which seems to indicate that you would want certain types of requests to go to master-eligible nodes.

So, I'm a bit turned around on whether or not to use this NodeSelector setting with my configuration and am hoping to have this cleared up if possible.

TLDR - I have dedicated master-eligible nodes and dedicated data/ingest nodes, should I set or should I not set NodeSelector.SKIP_DEDICATED_MASTERS on my rest client when building it?

Thanks!

That sentence in the first paragraph looks like a typo to me and should be negated. I will open up a PR for this and fix it.

In general the right way is to not send requests to dedicated master nodes. So that node selector is a good idea to use, when you have dedicated master nodes.

Update: Opened Docs: Fix node selector documentation by spinscale · Pull Request #75217 · elastic/elasticsearch · GitHub

2 Likes

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