You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by artemisn00b <pr...@nokia.com> on 2019/03/13 22:59:27 UTC

Federation vs cluster

I read the master on github for federated-address. From what I understand - a
producer send messages on any node, but all the consumers will receive the
message. How is it any different from using a cluster of those nodes, and
using on_demand load balancing? 

What happens if there is a broker failure, or a network split? 

Thanks, and sorry for so many questions!



--
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html

Re: Federation vs cluster

Posted by artemisn00b <pr...@nokia.com>.
You're right. It is a rare event, and doesn't happen often enough for the
tear-down and new connection to be that big of an issue. Thanks a lot for
your help! :)



--
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html

Re: Federation vs cluster

Posted by Justin Bertram <jb...@apache.org>.
> Is it fine to tear down and create a new connection on every failure?

I would expect that a broker failure requiring you to connect to a
different broker would be a relatively rare event. The core JMS client has
functionality to transparently reconnect to the same broker in the case of
some kind of network connection failure where the broker is still running
so you shouldn't need to do anything in your application to deal with that
situation. How often do you see brokers failing?


Justin

On Thu, Mar 14, 2019 at 1:31 PM artemisn00b <pr...@nokia.com> wrote:

> >Why are you using 3 VMs in the first place?  Is that what you were using
> before with the 5.x broker?
>
> The message broker is a small part of a large product. So, unfortunately
> due
> to the architecture, we HAVE to use 3 artemis servers, and can't do
> without.
> Using 3 brokers is not for higher throughput.
>
> >Even if you do set up HA you'll still need to account for the situation
> were the backup fails (as you mentioned) and you need to tear down the
> connection and create a new one. What specifically about your solution do
> you not think is robust?
>
> Is it fine to tear down and create a new connection on every failure? It
> works, but I'm not so experienced to understand and assess if it is robust.
> It just looks a little makeshift, to me, but again, I'm not sure, so I
> asked
> you! :)
>
>
>
> --
> Sent from:
> http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html
>

Re: Federation vs cluster

Posted by artemisn00b <pr...@nokia.com>.
>Why are you using 3 VMs in the first place?  Is that what you were using 
before with the 5.x broker? 

The message broker is a small part of a large product. So, unfortunately due
to the architecture, we HAVE to use 3 artemis servers, and can't do without.
Using 3 brokers is not for higher throughput.

>Even if you do set up HA you'll still need to account for the situation 
were the backup fails (as you mentioned) and you need to tear down the 
connection and create a new one. What specifically about your solution do 
you not think is robust? 

Is it fine to tear down and create a new connection on every failure? It
works, but I'm not so experienced to understand and assess if it is robust.
It just looks a little makeshift, to me, but again, I'm not sure, so I asked
you! :)



--
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html

Re: Federation vs cluster

Posted by Justin Bertram <jb...@apache.org>.
Why are you using 3 VMs in the first place?  Is that what you were using
before with the 5.x broker?  If so, you may need to reassess your
architecture since Artemis' performance is significantly better for many
use-cases. You may not need so many brokers. Have you conducted any
performance tests?

Even if you do set up HA you'll still need to account for the situation
were the backup fails (as you mentioned) and you need to tear down the
connection and create a new one. What specifically about your solution do
you not think is robust?


Justin

On Thu, Mar 14, 2019 at 1:06 PM artemisn00b <pr...@nokia.com> wrote:

> Hmm..so I have a question. Would you recommend me using a backup at all for
> the scenario below -
>
> I have 3 VMs as Artemis servers and I want all messages to be delivered to
> all consumers on the servers. I'm currently using a cluster (ip1,ip2,ip3)
> and I tear-down and create a new connection on a broker failure. So, it
> connects to a server that is up and running. It seems to be working fine,
> except I don't think it's a robust solution.
>
> Can you suggest a better implementation for the above scenario? Would you
> say I should use a backup? I'm trying without one, as it needs extra memory
> and in case the master fails, and the connection failed over to a slave,
> and
> that slave also fails, I anyway have to tear down that connection and
> create
> a new one.
>
> Thanks for all the help. Reallllyyyy appreciate it! :)
>
>
>
> --
> Sent from:
> http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html
>

Re: Federation vs cluster

Posted by artemisn00b <pr...@nokia.com>.
Hmm..so I have a question. Would you recommend me using a backup at all for
the scenario below -

I have 3 VMs as Artemis servers and I want all messages to be delivered to
all consumers on the servers. I'm currently using a cluster (ip1,ip2,ip3)
and I tear-down and create a new connection on a broker failure. So, it
connects to a server that is up and running. It seems to be working fine,
except I don't think it's a robust solution.

Can you suggest a better implementation for the above scenario? Would you
say I should use a backup? I'm trying without one, as it needs extra memory
and in case the master fails, and the connection failed over to a slave, and
that slave also fails, I anyway have to tear down that connection and create
a new one.

Thanks for all the help. Reallllyyyy appreciate it! :)



--
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html

Re: Federation vs cluster

Posted by Justin Bertram <jb...@apache.org>.
I'm just getting familiar with this feature, but my understanding is that
it wouldn't provide connection failover. I believe you'd still need to
configure HA for that functionality.


Justin

On Thu, Mar 14, 2019 at 12:38 PM artemisn00b <pr...@nokia.com>
wrote:

> The 3 servers are VMs. So, federation might work as well. Currently, I'm
> using a cluster and forwarding all messages to servers with consumers.
> Unfortunately, using a cluster by itself without HA means that I have to
> tear down the connection and create a new one, on every broker failure. So
> I
> was wondering if federated address would be a better fit for that. There
> are
> a lot of experienced people to help me out as well, that's not a problem!
> :)
>
> Would it be possible for you to say if it handles broker failures in a
> specific way?
>
>
>
> --
> Sent from:
> http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html
>

Re: Federation vs cluster

Posted by artemisn00b <pr...@nokia.com>.
The 3 servers are VMs. So, federation might work as well. Currently, I'm
using a cluster and forwarding all messages to servers with consumers.
Unfortunately, using a cluster by itself without HA means that I have to
tear down the connection and create a new one, on every broker failure. So I
was wondering if federated address would be a better fit for that. There are
a lot of experienced people to help me out as well, that's not a problem! :)

Would it be possible for you to say if it handles broker failures in a
specific way?



--
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html

Re: Federation vs cluster

Posted by mi...@me.com.INVALID.
So my advice here based on your previous questions is to first start without federation. It is something in a advanced setup and would expect someone with experience only to be implementing.




Federation is about global WAN linking brokers.


Clustering is about have a group of LAN brokers tightly clustered to work togeather.




Get Outlook for Android







On Wed, Mar 13, 2019 at 11:06 PM +0000, "artemisn00b" <pr...@nokia.com> wrote:










I read the master on github for federated-address. From what I understand - a
producer send messages on any node, but all the consumers will receive the
message. How is it any different from using a cluster of those nodes, and
using on_demand load balancing? 

What happens if there is a broker failure, or a network split? 

Thanks, and sorry for so many questions!



--
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html