# How do I connect to the application when I have dedicated master nodes?

**URL:** <https://discuss.elastic.co/t/how-do-i-connect-to-the-application-when-i-have-dedicated-master-nodes/108932>\
**Category:** Elasticsearch\
**Created:** [November 23, 2017, 6:31pm UTC](https://discuss.elastic.co/t/how-do-i-connect-to-the-application-when-i-have-dedicated-master-nodes/108932 "2017-11-23T18:31:57Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![RafaelPosthaus](https://avatars.discourse-cdn.com/v4/letter/r/73ab20/32.png) [@RafaelPosthaus](https://discuss.elastic.co/u/RafaelPosthaus)\
**Post date:** [November 23, 2017, 6:31pm UTC](https://discuss.elastic.co/t/how-do-i-connect-to-the-application-when-i-have-dedicated-master-nodes/108932/1 "2017-11-23T18:31:57Z")

</div>

I have a cluster with 4 date nodes, and 3 dedicated master nodes, I have a question, regarding the connection driver, should I pass the ips of the 3 dedicated master nodes?

thank you so much.

---

<div class="post-metadata">

**Author:** ![abdon](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/abdon/32/9195_2.png) [@abdon](https://discuss.elastic.co/u/abdon)\
**Post date:** [November 23, 2017, 7:24pm UTC](https://discuss.elastic.co/t/how-do-i-connect-to-the-application-when-i-have-dedicated-master-nodes/108932/2 "2017-11-23T19:24:09Z")

</div>

No, you want to do the opposite. Master nodes are not there to handle client requests. Dedicated master nodes are there for the stability of your cluster, and should do nothing else.

What you want to do is pass the IPs of your 4 data nodes.

---

<div class="post-metadata">

**Author:** ![RafaelPosthaus](https://avatars.discourse-cdn.com/v4/letter/r/73ab20/32.png) [@RafaelPosthaus](https://discuss.elastic.co/u/RafaelPosthaus)\
**Post date:** [November 24, 2017, 1:10pm UTC](https://discuss.elastic.co/t/how-do-i-connect-to-the-application-when-i-have-dedicated-master-nodes/108932/3 "2017-11-24T13:10:49Z")

</div>

Even when I use the transportClient?  
I've always found that in transportClient I should pass the ips from the master nodes. Just saying that I am in version 2.4.2. Thank you

---

<div class="post-metadata">

**Author:** ![javanna](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/javanna/32/4698_2.png) [@javanna](https://discuss.elastic.co/u/javanna)\
**Post date:** [November 24, 2017, 2:59pm UTC](https://discuss.elastic.co/t/how-do-i-connect-to-the-application-when-i-have-dedicated-master-nodes/108932/4 "2017-11-24T14:59:46Z")

</div>

Hi Rafael,  
I don't see why there would be a difference with the transport client. If you have dedicated master nodes and you configure them on any client, they will be loaded with client requests which they will always forward (besides cluster state read/update request) to data nodes. You really do not want to use dedicated master nodes as proxies, you rather want to configure data nodes on your client, like Abdon said above.

Cheers  
Luca

---

<div class="post-metadata">

**Author:** ![RafaelPosthaus](https://avatars.discourse-cdn.com/v4/letter/r/73ab20/32.png) [@RafaelPosthaus](https://discuss.elastic.co/u/RafaelPosthaus)\
**Post date:** [November 24, 2017, 3:22pm UTC](https://discuss.elastic.co/t/how-do-i-connect-to-the-application-when-i-have-dedicated-master-nodes/108932/5 "2017-11-24T15:22:17Z")

</div>

I thought the java transportClient driver could have some intelligence and do the routing.

but thanks for your response.

---

<div class="post-metadata">

**Author:** ![thiago](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/thiago/32/32096_2.png) [@thiago](https://discuss.elastic.co/u/thiago)\
**Post date:** [November 24, 2017, 3:29pm UTC](https://discuss.elastic.co/t/how-do-i-connect-to-the-application-when-i-have-dedicated-master-nodes/108932/6 "2017-11-24T15:29:11Z")

</div>

The behavior you are referring to is related to Node Client and not Transport Client. See [https://www.elastic.co/guide/en/elasticsearch/guide/current/\_transport\_client\_versus\_node\_client.html](https://www.elastic.co/guide/en/elasticsearch/guide/current/_transport_client_versus_node_client.html)

---

<div class="post-metadata">

**Author:** ![RafaelPosthaus](https://avatars.discourse-cdn.com/v4/letter/r/73ab20/32.png) [@RafaelPosthaus](https://discuss.elastic.co/u/RafaelPosthaus)\
**Post date:** [November 24, 2017, 3:57pm UTC](https://discuss.elastic.co/t/how-do-i-connect-to-the-application-when-i-have-dedicated-master-nodes/108932/7 "2017-11-24T15:57:59Z")

</div>

Would you have any configuration tips on transportClient for a web application? for example:  
client.transport.ping\_timeout "," 50s ",  
client.transport.sniff ", true,  
discovery.zen.ping.multicast.enabled ", false,  
discovery.zen.ping.unicast.enabled ", true,  
discovery.zen.multicast.enabled ", false,  
discovery.zen.unicast.enabled ", true,  
this connection was written more than three years ago, with only tips found on the web.

thankful

---

<div class="post-metadata">

**Author:** ![thiago](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/thiago/32/32096_2.png) [@thiago](https://discuss.elastic.co/u/thiago)\
**Post date:** [November 24, 2017, 4:41pm UTC](https://discuss.elastic.co/t/how-do-i-connect-to-the-application-when-i-have-dedicated-master-nodes/108932/8 "2017-11-24T16:41:41Z")

</div>

These configurations are fine.

Actually, it's a little bit more confusing and that's one of the reasons the Transport Client is being deprecated.

According to the [Transport Client](https://www.elastic.co/guide/en/elasticsearch/client/java-api/6.1/transport-client.html) docs, if you enable `client.transport.sniff`:

> [...] If, for instance, you initially connect to a master node, after sniffing, no further requests will go to that master node, but rather to any data nodes instead. The reason the transport client excludes non-data nodes is to avoid sending search traffic to master only nodes.

So if you decide to stick with Transport Client then enable sniffing and list your master nodes addresses and it will do as described above.

I hope that helps!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [December 22, 2017, 4:42pm UTC](https://discuss.elastic.co/t/how-do-i-connect-to-the-application-when-i-have-dedicated-master-nodes/108932/9 "2017-12-22T16:42:20Z")

</div>

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