We are having 15 machines ElasticSearch cluster of version 5.6.0, out of which only 5 machines are defined as master eligible and all 15 machines are defined as data nodes.
Now If we are using Java Transport Client as specified in https://www.elastic.co/guide/en/elasticsearch/client/java-api/current/transport-client.html as below
TransportClient client = new PreBuiltTransportClient(Settings.EMPTY)
.addTransportAddress(new InetSocketTransportAddress(InetAddress.getByName("host1"), 9300))
.addTransportAddress(new InetSocketTransportAddress(InetAddress.getByName("host2"), 9300));
Then which nodes to be added in transport address in transport client??
Should we add only master eligible 5 nodes in client connection or all 15 data nodes need to be added in client connection?