# About Node Discovery and Clients (newbie question)

**URL:** https://discuss.elastic.co/t/about-node-discovery-and-clients-newbie-question/5382
**Category:** Elasticsearch
**Created:** [September 14, 2011, 7:38pm UTC](https://discuss.elastic.co/t/about-node-discovery-and-clients-newbie-question/5382 "2011-09-14T19:38:41Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Frederic](https://avatars.discourse-cdn.com/v4/letter/f/4491bb/32.png) [@Frederic](https://discuss.elastic.co/u/Frederic)
#### Post date: [September 14, 2011, 7:38pm UTC](https://discuss.elastic.co/t/about-node-discovery-and-clients-newbie-question/5382/1 "2011-09-14T19:38:41Z")

</div>

I have an ES cluster divided into 6 servers at 172.16.146.xxx and  
172.16.147.xxx with no multicast discovery enabled:

discovery.zen.multicast.enabled: false

but with two gossip servers, one from each ip range, configured as the  
unicast hosts list, so the cluster is discovered and formed ok.

discovery.zen.ping.unicast.hosts: ["172.16.146.1", "172.16.147.1"].

Does this configuration (no multicast and only two unicast hosts) make  
sense? What would happen if one of these fails?

At the same time I've created a client to index/search data in a ES  
cluster, based on configuration it initiates a Node or a Transport  
client, with a list of hosts also configured for the latter.

Hosting the client in 172.16.137.156, if I start a Node client, with  
the cluster name correctly set, it can't discover the cluster  
(MasterNotDiscoveredException), but using the Transport one, with the  
list of hosts explicitly declared, it works ok, as expected.

So, how the Node client would find the master if no multicast nor list  
of hosts was explicitly defined?

Thanks for your great support,

---

<div class="post-metadata">

### Author: ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)
#### Post date: [September 15, 2011, 9:48am UTC](https://discuss.elastic.co/t/about-node-discovery-and-clients-newbie-question/5382/2 "2011-09-15T09:48:20Z")

</div>

How did you configure the node client? It uses the same discovery as the  
other nodes in the cluster. You need to configure it with the same settings  
as the non client nodes for discovery.

On Wed, Sep 14, 2011 at 10:38 PM, Frederic [focampo.br@gmail.com](mailto:focampo.br@gmail.com) wrote:

> I have an ES cluster divided into 6 servers at 172.16.146.xxx and  
> 172.16.147.xxx with no multicast discovery enabled:
> 
> discovery.zen.multicast.enabled: false
> 
> but with two gossip servers, one from each ip range, configured as the  
> unicast hosts list, so the cluster is discovered and formed ok.
> 
> discovery.zen.ping.unicast.hosts: ["172.16.146.1", "172.16.147.1"].
> 
> Does this configuration (no multicast and only two unicast hosts) make  
> sense? What would happen if one of these fails?
> 
> At the same time I've created a client to index/search data in a ES  
> cluster, based on configuration it initiates a Node or a Transport  
> client, with a list of hosts also configured for the latter.
> 
> Hosting the client in 172.16.137.156, if I start a Node client, with  
> the cluster name correctly set, it can't discover the cluster  
> (MasterNotDiscoveredException), but using the Transport one, with the  
> list of hosts explicitly declared, it works ok, as expected.
> 
> So, how the Node client would find the master if no multicast nor list  
> of hosts was explicitly defined?
> 
> Thanks for your great support,

---

<div class="post-metadata">

### Author: ![Frederic](https://avatars.discourse-cdn.com/v4/letter/f/4491bb/32.png) [@Frederic](https://discuss.elastic.co/u/Frederic)
#### Post date: [September 15, 2011, 1:50pm UTC](https://discuss.elastic.co/t/about-node-discovery-and-clients-newbie-question/5382/3 "2011-09-15T13:50:18Z")

</div>

Oh, yes that makes sense. I just configured the cluster name for the  
node client following the Java API client page, but forgot to set the  
other cluster settings.

One last one, in which scenarios would you recommend to configure  
cluster discovery using unicast over multicast? (thinking on server  
failures, new added nodes, etc)

Thanks,

On 15 sep, 06:48, Shay Banon [kim...@gmail.com](mailto:kim...@gmail.com) wrote:

> How did you configure the node client? It uses the same discovery as the  
> other nodes in the cluster. You need to configure it with the same settings  
> as the non client nodes for discovery.
> 
> On Wed, Sep 14, 2011 at 10:38 PM, Frederic [focampo...@gmail.com](mailto:focampo...@gmail.com) wrote:
> 
> > I have an ES cluster divided into 6 servers at 172.16.146.xxx and  
> > 172.16.147.xxx with no multicast discovery enabled:
> 
> > discovery.zen.multicast.enabled: false
> 
> > but with two gossip servers, one from each ip range, configured as the  
> > unicast hosts list, so the cluster is discovered and formed ok.
> 
> > discovery.zen.ping.unicast.hosts: ["172.16.146.1", "172.16.147.1"].
> 
> > Does this configuration (no multicast and only two unicast hosts) make  
> > sense? What would happen if one of these fails?
> 
> > At the same time I've created a client to index/search data in a ES  
> > cluster, based on configuration it initiates a Node or a Transport  
> > client, with a list of hosts also configured for the latter.
> 
> > Hosting the client in 172.16.137.156, if I start a Node client, with  
> > the cluster name correctly set, it can't discover the cluster  
> > (MasterNotDiscoveredException), but using the Transport one, with the  
> > list of hosts explicitly declared, it works ok, as expected.
> 
> > So, how the Node client would find the master if no multicast nor list  
> > of hosts was explicitly defined?
> 
> > Thanks for your great support,

---

<div class="post-metadata">

### Author: ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)
#### Post date: [September 16, 2011, 6:48pm UTC](https://discuss.elastic.co/t/about-node-discovery-and-clients-newbie-question/5382/4 "2011-09-16T18:48:36Z")

</div>

Unicast allows for simpler fine grained control over what talks to what.  
Multicast allows for that as well, but you need to configure different  
multicast IPs / ports. Both are good.

On Thu, Sep 15, 2011 at 4:50 PM, Frederic [focampo.br@gmail.com](mailto:focampo.br@gmail.com) wrote:

> Oh, yes that makes sense. I just configured the cluster name for the  
> node client following the Java API client page, but forgot to set the  
> other cluster settings.
> 
> One last one, in which scenarios would you recommend to configure  
> cluster discovery using unicast over multicast? (thinking on server  
> failures, new added nodes, etc)
> 
> Thanks,
> 
> On 15 sep, 06:48, Shay Banon [kim...@gmail.com](mailto:kim...@gmail.com) wrote:
> 
> > How did you configure the node client? It uses the same discovery as the  
> > other nodes in the cluster. You need to configure it with the same  
> > settings  
> > as the non client nodes for discovery.
> > 
> > On Wed, Sep 14, 2011 at 10:38 PM, Frederic [focampo...@gmail.com](mailto:focampo...@gmail.com) wrote:
> > 
> > > I have an ES cluster divided into 6 servers at 172.16.146.xxx and  
> > > 172.16.147.xxx with no multicast discovery enabled:
> > 
> > > discovery.zen.multicast.enabled: false
> > 
> > > but with two gossip servers, one from each ip range, configured as the  
> > > unicast hosts list, so the cluster is discovered and formed ok.
> > 
> > > discovery.zen.ping.unicast.hosts: ["172.16.146.1", "172.16.147.1"].
> > 
> > > Does this configuration (no multicast and only two unicast hosts) make  
> > > sense? What would happen if one of these fails?
> > 
> > > At the same time I've created a client to index/search data in a ES  
> > > cluster, based on configuration it initiates a Node or a Transport  
> > > client, with a list of hosts also configured for the latter.
> > 
> > > Hosting the client in 172.16.137.156, if I start a Node client, with  
> > > the cluster name correctly set, it can't discover the cluster  
> > > (MasterNotDiscoveredException), but using the Transport one, with the  
> > > list of hosts explicitly declared, it works ok, as expected.
> > 
> > > So, how the Node client would find the master if no multicast nor list  
> > > of hosts was explicitly defined?
> > 
> > > Thanks for your great support,

---

<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: [July 6, 2017, 3:54am UTC](https://discuss.elastic.co/t/about-node-discovery-and-clients-newbie-question/5382/5 "2017-07-06T03:54:15Z")

</div>


