Doubt about Unicast discovery


(Bala Murali) #1

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


(Mark Walkom) #2

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


(Bala Murali) #3

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


(Isaac Perez Moncho) #4

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.


(Bala Murali) #5

thanks @isaacpm


(Bala Murali) #6

hi @isaacpm @warkolm

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


(Isaac Perez Moncho) #7

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.


(Bala Murali) #9

hi @isaacpm

can you clearly describe about it.
it is too confusing


(Isaac Perez Moncho) #10

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?


(Bala Murali) #11

hi @isaacpm

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???

here broadcasting meaning what????


(Isaac Perez Moncho) #12

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.


(Bala Murali) #13

thanks much @isaacpm

got a good idea !!!!


(system) #14

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