# Doubt about Unicast discovery

**URL:** <https://discuss.elastic.co/t/doubt-about-unicast-discovery/65781>\
**Category:** Elasticsearch\
**Created:** [November 11, 2016, 9:28am UTC](https://discuss.elastic.co/t/doubt-about-unicast-discovery/65781 "2016-11-11T09:28:11Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![Balamurali](https://avatars.discourse-cdn.com/v4/letter/b/90db22/32.png) [@Balamurali](https://discuss.elastic.co/u/Balamurali)\
**Post date:** [November 11, 2016, 9:28am UTC](https://discuss.elastic.co/t/doubt-about-unicast-discovery/65781/1 "2016-11-11T09:28:11Z")

</div>

hi ,

i had discovery.zen.ping.unicast.hosts: hostIP:port in my config file

all nodes specified in unicast are added to cluster ,thats fine

but if i start new es node with same clustername without mentioning in unicast.hosts , that node too added to cluster.  
then what is meaning of this unicast

please anyone can help me

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [November 11, 2016, 9:30am UTC](https://discuss.elastic.co/t/doubt-about-unicast-discovery/65781/2 "2016-11-11T09:30:32Z")

</div>

The list is a "seed", so any nodes that use it will contact the cluster, find the master, then join.

---

<div class="post-metadata">

**Author:** ![Balamurali](https://avatars.discourse-cdn.com/v4/letter/b/90db22/32.png) [@Balamurali](https://discuss.elastic.co/u/Balamurali)\
**Post date:** [November 11, 2016, 9:42am UTC](https://discuss.elastic.co/t/doubt-about-unicast-discovery/65781/3 "2016-11-11T09:42:08Z")

</div>

Thanks @warkolm  
my question is whether unicast.hosts limits hosts which can be join to cluster?

---

<div class="post-metadata">

**Author:** ![isaacpm](https://avatars.discourse-cdn.com/v4/letter/i/b9e5f3/32.png) [@isaacpm](https://discuss.elastic.co/u/isaacpm)\
**Post date:** [November 11, 2016, 11:12am UTC](https://discuss.elastic.co/t/doubt-about-unicast-discovery/65781/4 "2016-11-11T11:12:02Z")

</div>

It shouldn't.  
If you point a new host to join the cluster, the existing hosts will allow it even if not in their list.

---

<div class="post-metadata">

**Author:** ![Balamurali](https://avatars.discourse-cdn.com/v4/letter/b/90db22/32.png) [@Balamurali](https://discuss.elastic.co/u/Balamurali)\
**Post date:** [November 11, 2016, 11:20am UTC](https://discuss.elastic.co/t/doubt-about-unicast-discovery/65781/5 "2016-11-11T11:20:03Z")

</div>

thanks @isaacpm

---

<div class="post-metadata">

**Author:** ![Balamurali](https://avatars.discourse-cdn.com/v4/letter/b/90db22/32.png) [@Balamurali](https://discuss.elastic.co/u/Balamurali)\
**Post date:** [November 11, 2016, 11:31am UTC](https://discuss.elastic.co/t/doubt-about-unicast-discovery/65781/6 "2016-11-11T11:31:24Z")

</div>

hi @isaacpm @warkolm

> [@isaacpm](#):
>
> It shouldn't.  
> If you point a new host to join the cluster, the existing hosts will allow it even if not in their list.

then how can i secure my cluster from avoiding unwanted nodes adding into cluster.  
what are main advantages of unicast over multicast

---

<div class="post-metadata">

**Author:** ![isaacpm](https://avatars.discourse-cdn.com/v4/letter/i/b9e5f3/32.png) [@isaacpm](https://discuss.elastic.co/u/isaacpm)\
**Post date:** [November 11, 2016, 11:37am UTC](https://discuss.elastic.co/t/doubt-about-unicast-discovery/65781/7 "2016-11-11T11:37:46Z")

</div>

From what I know you should do this at a network/firewall level. Maybe shield provides that, but it's part of the xpack, which is a paying feature.  
What's for sure is that you must provide network security, otherwise, depending on the config anyone will be able to connect to port 9200 and do whatever they like with the cluster/data.

The difference is that with multicast the server will join ANY cluster that it's in broadcast range.  
With unicast you direct it to which cluster it will join.

---

<div class="post-metadata">

**Author:** ![Balamurali](https://avatars.discourse-cdn.com/v4/letter/b/90db22/32.png) [@Balamurali](https://discuss.elastic.co/u/Balamurali)\
**Post date:** [November 11, 2016, 11:44am UTC](https://discuss.elastic.co/t/doubt-about-unicast-discovery/65781/9 "2016-11-11T11:44:26Z")

</div>

hi @isaacpm

> [@isaacpm](#):
>
> The difference is that with multicast the server will join ANY cluster that it's in broadcast range.  
> With unicast you direct it to which cluster it will join.

can you clearly describe about it.  
it is too confusing

---

<div class="post-metadata">

**Author:** ![isaacpm](https://avatars.discourse-cdn.com/v4/letter/i/b9e5f3/32.png) [@isaacpm](https://discuss.elastic.co/u/isaacpm)\
**Post date:** [November 11, 2016, 11:49am UTC](https://discuss.elastic.co/t/doubt-about-unicast-discovery/65781/10 "2016-11-11T11:49:23Z")

</div>

Let's say your servers can broadcast to the following network range:  
10.0.0.0/16  
And you have clusters in the following networks:  
10.0.1.0/24  
10.0.2.0/24  
10.0.3.0/24  
You launch a new server set up to join by broadcasting, it will broadcast to 10.0.0.0/16.  
Which means you have absolutely no idea which cluster it will join. Because any of the three clusters in those networks will accept the request.

Now you have a cluster configured to unicast to a node in the cluster seating in the 10.0.1.0/24, let's say 10.0.0.1.  
Now you know exactly which cluster it will join.

Same applies if you have 3 different cluster in the same network range.

if you have one cluster only in one network range only, this may not make a difference now. But may cause problems if someone creates another cluster with broadcasting in the future.

Does that make sense?

---

<div class="post-metadata">

**Author:** ![Balamurali](https://avatars.discourse-cdn.com/v4/letter/b/90db22/32.png) [@Balamurali](https://discuss.elastic.co/u/Balamurali)\
**Post date:** [November 11, 2016, 12:24pm UTC](https://discuss.elastic.co/t/doubt-about-unicast-discovery/65781/11 "2016-11-11T12:24:03Z")

</div>

hi @isaacpm

> [@isaacpm](#):
>
> You launch a new server set up to join by broadcasting, it will broadcast to 10.0.0.0/16.  
> Which means you have absolutely no idea which cluster it will join. Because any of the three clusters in those networks will accept the request.

whether these three clusters has same name? then it it should united??  
whether these three clusters has different name? then it cannot be accept request right???

> [@isaacpm](#):
>
> 10.0.3.0/24  
> You launch a new server set up to join by broadcasting, it will broadcast to 10.0.0.0/16

here broadcasting meaning what????

---

<div class="post-metadata">

**Author:** ![isaacpm](https://avatars.discourse-cdn.com/v4/letter/i/b9e5f3/32.png) [@isaacpm](https://discuss.elastic.co/u/isaacpm)\
**Post date:** [November 11, 2016, 12:37pm UTC](https://discuss.elastic.co/t/doubt-about-unicast-discovery/65781/12 "2016-11-11T12:37:53Z")

</div>

> [@Balamurali](#):
>
> whether these three clusters has same name? then it it should united??  
> whether these three clusters has different name? then it cannot be accept request right???

I think you are confusing cluster with node, a cluster is composed of one or more nodes.A cluster has one name, two names means to clusters.  
Nodes can have the same name or different ones, but they join one cluster.

I don't know what would happen if you try to join a node with a different cluster name in its config to an existing cluster. But I would expect to fail.

By broadcasting I mean the sending of packages to all addresses in that network. That's what the option broadcast does in the elasticsearch settings, which is the opposite of unicasting.

---

<div class="post-metadata">

**Author:** ![Balamurali](https://avatars.discourse-cdn.com/v4/letter/b/90db22/32.png) [@Balamurali](https://discuss.elastic.co/u/Balamurali)\
**Post date:** [November 11, 2016, 12:42pm UTC](https://discuss.elastic.co/t/doubt-about-unicast-discovery/65781/13 "2016-11-11T12:42:17Z")

</div>

thanks much @isaacpm

> [@isaacpm](#):
>
> By broadcasting I mean the sending of packages to all addresses in that network. That's what the option broadcast does in the elasticsearch settings, which is the opposite of unicasting.

got a good idea !!!!

---

<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 9, 2016, 12:42pm UTC](https://discuss.elastic.co/t/doubt-about-unicast-discovery/65781/14 "2016-12-09T12:42:17Z")

</div>

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