I am currently using Transport client ( java) , and I have 3 node setup with master and date = true.
and in my java client i am adding all 3 nodes using addTransportAddress
My first question is do i need to add all the 3 nodes ? If so What if I increase this 3 nodes setup to say 7 or 9 nodes with dedicated 3 master nodes, in that case also do i have to add all 9 nodes in my java transport client?
No. You must add at least one. If you don't activate sniffing, then only this single node will be used to query your cluster.
If you add the 3 nodes then all of them will be used. Which is safer IMO as one of the other nodes can fail at some point.
If you increase the number of nodes in your cluster, only the nodes you defined will be used. Then you can decide if you want to send the Client traffic to more nodes or not.
The node that gets a query is known as the coordinating node. It can be any node in the cluster whatever his role.
A nice practice for "big" clusters is to have 3 dedicated master only nodes (data: false, ingest: false, master: true), 2 or more coordinating nodes (master: false, data: false) and data nodes (master: false, ingest: false) and if needed ingest only nodes (data: false, ingest: true, master: false).
Also what does this mean? Only the nodes you defined? do i need to add only coordinating nodes in my transport client? i am not planning to have any coordinating nodes just Master nodes and data nodes, is this fine? IF so should i add only master nodes in my client or just data nodes or both?
If you meant "dedicated coordinating nodes", no. It's not mandatory.
Only the nodes you defined?
The nodes that you add with addTransportAddress().
If so should i add only master nodes in my client or just data nodes or both?
As you wish. If you add only master nodes, then the queries will be launched to all shards from the master eligible node which is getting the request from the Transport Client.
If you add only data nodes, then you will add some additional memory pressure on the data nodes but that can be perfectly fine.
To sum up, if your master nodes have enough memory, might be preferable to only add them to the list.
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.