You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "anton.mithun" <mi...@gmail.com> on 2016/08/01 10:59:09 UTC

Artemis - Two clusters and one udp group ip:port

Hi,

I have deployed  a live - backup cluster. sending/reception all working when
clients are connected to same udp://231.7.7.7:9876. Failover and all are
working. My concern is that what if another cluster, created by some one
else, also get connection to the same group ip:port udp://231.7.7.7:9876.
Can I filter them out? will their live sever get my messages?

Thank You.



--
View this message in context: http://activemq.2283324.n4.nabble.com/Artemis-Two-clusters-and-one-udp-group-ip-port-tp4714902.html
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.

Re: Artemis - Two clusters and one udp group ip:port

Posted by Justin Bertram <jb...@apache.com>.
I think that if you have two independent clusters using the same UDP address:port and then you have a client attempting to connect to one of those clusters using UDP discovery then there's no deterministic way to connect to one of the clusters vs the other.  I hadn't thought about this particular scenario previously, but it's obviously another good reason to ensure every cluster operates on its own UDP address:port.


Justin

----- Original Message -----
From: "anton.mithun" <mi...@gmail.com>
To: dev@activemq.apache.org
Sent: Sunday, August 7, 2016 10:43:17 PM
Subject: Re: Artemis - Two clusters and one udp group ip:port

Thanks a lot Justin. Your answer is crystal clear. Both options seems
perfect, even though I have implemented static clustering presently. 

But I just want to make my  previous reply a bit more clear (Sorry if I am
missing the whole concept) 

Say I am having two clusters (cluster1 and cluster2), each connected to same 
UDP address and port (udp://231.7.7.7:9876) and secured using cluster
username-password. 
And from my client application I am creating a connection factory
ActiveMQConnectionFactory connectionFactory = new
ActiveMQConnectionFactory("udp://231.7.7.7:9876"); 
Which cluster am I getting connected to?cluster1 or cluster2?
Or do I need to provide cluster username-password to get connection to the
concerned cluster?
like connection = connectionFactory.createConnection(cluster1-username,
cluster1-password); to get connected to cluster1.

thanks for the time you all have given me.



--
View this message in context: http://activemq.2283324.n4.nabble.com/Artemis-Two-clusters-and-one-udp-group-ip-port-tp4714902p4715111.html
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.

Re: Artemis - Two clusters and one udp group ip:port

Posted by "anton.mithun" <mi...@gmail.com>.
Thanks a lot Justin. Your answer is crystal clear. Both options seems
perfect, even though I have implemented static clustering presently. 

But I just want to make my  previous reply a bit more clear (Sorry if I am
missing the whole concept) 

Say I am having two clusters (cluster1 and cluster2), each connected to same 
UDP address and port (udp://231.7.7.7:9876) and secured using cluster
username-password. 
And from my client application I am creating a connection factory
ActiveMQConnectionFactory connectionFactory = new
ActiveMQConnectionFactory("udp://231.7.7.7:9876"); 
Which cluster am I getting connected to?cluster1 or cluster2?
Or do I need to provide cluster username-password to get connection to the
concerned cluster?
like connection = connectionFactory.createConnection(cluster1-username,
cluster1-password); to get connected to cluster1.

thanks for the time you all have given me.



--
View this message in context: http://activemq.2283324.n4.nabble.com/Artemis-Two-clusters-and-one-udp-group-ip-port-tp4714902p4715111.html
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.

Re: Artemis - Two clusters and one udp group ip:port

Posted by Justin Bertram <jb...@apache.com>.
Each *cluster* should ideally use the same UDP address and port.  If that's not possible then I see two options:

  1) Specify a unique cluster user and password for each cluster.  The nodes from the different clusters will still attempt to cluster with each other since they will be able to "see" each other, but security will prevent the nodes from one cluster from clustering with the nodes in the other cluster.

  2) Use static clustering.  In other words, manually specify the nodes in the cluster rather than relying on UDP discovery.


Justin

----- Original Message -----
From: "anton.mithun" <mi...@gmail.com>
To: dev@activemq.apache.org
Sent: Wednesday, August 3, 2016 10:21:34 PM
Subject: Re: Artemis - Two clusters and one udp group ip:port

Hi,

Thanks for the reply. As per my understanding, specifying the user/password
for the cluster doesn't allow a client to differentiate between clusters on
the same udp address. It gives cluster the power to permit other nodes
whether to get connection to that cluster or not. May be I am wrong.
Referring the document at the moment.

And also, when u said "I would keep each server on its own UDP address. " ,
did you mean "each cluster" instead of "each server"?


Cheers



--
View this message in context: http://activemq.2283324.n4.nabble.com/Artemis-Two-clusters-and-one-udp-group-ip-port-tp4714902p4715049.html
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.

Re: Artemis - Two clusters and one udp group ip:port

Posted by "anton.mithun" <mi...@gmail.com>.
Hi,

Thanks for the reply. As per my understanding, specifying the user/password
for the cluster doesn't allow a client to differentiate between clusters on
the same udp address. It gives cluster the power to permit other nodes
whether to get connection to that cluster or not. May be I am wrong.
Referring the document at the moment.

And also, when u said "I would keep each server on its own UDP address. " ,
did you mean "each cluster" instead of "each server"?


Cheers



--
View this message in context: http://activemq.2283324.n4.nabble.com/Artemis-Two-clusters-and-one-udp-group-ip-port-tp4714902p4715049.html
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.

Re: Artemis - Two clusters and one udp group ip:port

Posted by Clebert Suconic <cl...@gmail.com>.
you specify the user/password for the cluster...

But I would keep each server on its own UDP address.

On Mon, Aug 1, 2016 at 6:59 AM, anton.mithun <mi...@gmail.com> wrote:
> Hi,
>
> I have deployed  a live - backup cluster. sending/reception all working when
> clients are connected to same udp://231.7.7.7:9876. Failover and all are
> working. My concern is that what if another cluster, created by some one
> else, also get connection to the same group ip:port udp://231.7.7.7:9876.
> Can I filter them out? will their live sever get my messages?
>
> Thank You.
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/Artemis-Two-clusters-and-one-udp-group-ip-port-tp4714902.html
> Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.



-- 
Clebert Suconic