Doubt about Unicast discovery

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

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

1 Like

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

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.

1 Like

thanks @isaacpm

1 Like

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

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.

hi @isaacpm

can you clearly describe about it.
it is too confusing

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?

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

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.

1 Like

thanks much @isaacpm

got a good idea !!!!

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