Assume I have a cluster containing master-eligible nodes, data nodes and coordinating nodes. When I initialize a REST client, which of the above node types should I include? All of the nodes, only the data nodes, only the coordinating nodes, or some combination thereof?
For example:
RestClient restClient = RestClient.builder(
new HttpHost("master-eligible-node-1", 9200, "http"),
new HttpHost("master-eligible-node-2", 9200, "http"),
new HttpHost("master-eligible-node-3", 9200, "http")).build();
Or,
RestClient restClient = RestClient.builder(
new HttpHost("master-eligible-node-1", 9200, "http"),
new HttpHost("master-eligible-node-2", 9200, "http"),
new HttpHost("master-eligible-node-3", 9200, "http"),
new HttpHost("data-node-1", 9200, "http"),
new HttpHost("data-node-2", 9200, "http"),
new HttpHost("data-node-n", 9200, "http"),
new HttpHost("coord-node-1", 9200, "http"),
new HttpHost("coord-node-n", 9200, "http")).build();
As a second part, is it possible to initialize the REST client only to coordinating nodes, or only to data nodes? I was thinking that I might want to do that if I want to isolate query operations vs indexing operations.
Thanks!