Clustering : NodeName

46 views
Skip to first unread message

Pierre Kolle

unread,
May 5, 2021, 11:42:04 AM5/5/21
to vernemq-users
Hello,

I'm new on VerneMQ and I want to know if it's possible to generate automatically a unique node name ?

Because I'm deploying brokers in a local network and I want them to join un cluster... I have an application which will manage this step (of if it is another way, I would like to know X) ) but I'm locked with this step...

The problem is on the hardware of the linux, the user can choose another IP, and I will have to refresh the .conf if there is no other way...

Thanks a lot =)

Pierre

André Fatton

unread,
May 6, 2021, 4:23:01 AM5/6/21
to vernemq-users
Hi Pierre,

I don't have a full picture of what you want to do, but here's a couple of remarks.

1. You don't have to set the nodename to the changed IP necessarily. The nodenames have to be unique within the cluster but can be of form 'a...@127.0.0.1', 'b...@127.0.0.1', for instance.
2. The nodes find each other by their nodename using the EPMD daemon running on each node. This is like a discovery service, using the nodenames and mapping them to actual contact endpoints (IPs). You don't have to configure anything for this other than opening the documented ports.
3. Contrary to the nodenames, you *do* have to set a specific IP for the vmq_listener. This is a listener where nodes contact each other directly (over IP, Port, that is not using EPDM) to set up connections for inter-node message delivery. Instead of using a specific external IP, some users set this to 0.0.0.0:44053, so that the vmq listener is started on every network interface.

I hope this helps,
Best,
André

Pierre Kolle

unread,
May 7, 2021, 4:16:17 AM5/7/21
to vernemq-users, André Fatton
Hello !

Thanks for your answer.

1. So, I have to generate a vm.args for each linux I create to guarantee that they are unique ? Because, now, I just have 2 devices, but the goal is to have a scalable modular system and if I make 1000 devices, I will have to guarantee that they are all uniques. I can think about a solution to override a part of the name which the user can set… for example on his screen, if he has 4 devices, I will have to configure A, B, C and D instead of A A A A… Or I have to find a solution to define the name with the MAC address… There is no other solution ?

2. I’m not sure to understand… each device have to know to what nodename they have to connect to, no ? For example, imagine that I make 4 devices which I will call A@127.0.0.1, B@127.0.0.1, C@127.0.0.1, and D...@127.0.0.1. On each device, I have 2 ethernet ports, so I wire the 4 devices. Here, I can’t make automatically the cluster ? For the moment, on I have to make « vmq-admin cluster join discovery-node=B...@127.0.0.1 » on A, etc, no ? 
I have to find a solution to make this step fully automatic, for a unknown number of different devices (and if possible, I have to involve the user in the naming of the nodes…)

3. Yes, I already made that 😊 

Is it possible to list the topic of the cluster ? 

Thanks for your help.

Le 6 mai 2021 à 10:23, André Fatton <a...@erl.io> a écrit :


--
You received this message because you are subscribed to a topic in the Google Groups "vernemq-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/vernemq-users/B16jCH1IH0k/unsubscribe.
To unsubscribe from this group and all its topics, send an email to vernemq-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vernemq-users/bc73b9ca-ca19-421a-ba3b-995c6233c93an%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages