Hello All,
I am new to Elastic Search and writing a Java code to filter some data based on exact match. I am using below code to open a connection to ES cluster.
If I have 10 nodes in the cluster, how many I should configure to TransportClient through addTransportAddress method. All 10 or just all master nodes or all data nodes ? Please explain implications of doing just 1 or more. Thanks in advance.
It means that the client will be able to send the traffic to any of those nodes.
Without this option, the client will send traffic only to the nodes you defined. Which is super useful if for example you want to add some client nodes in front of your elasticsearch cluster.
I am not able to understand which one is beneficial, to let my client sniff or let it talk with specific nodes ? It will be great if you can throw some light on that.
The only benefit I can see by adding all nodes (or sniffing) is that the client calls will be made on all nodes so basically it would distribute the load.
It depends on you cluster size basically.
If you have a cluster with 3 nodes, I would just add all the 3 nodes on the TransportClient.
If you have a cluster of 20 data nodes + 3 master nodes + 2 client nodes, I'd send the traffic only to the 2 client nodes.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.