You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by dcheckoway <dc...@gmail.com> on 2011/09/07 11:28:50 UTC

Preferred config for 2-node network of brokers?

Hello,

I'd like your advice on setting up a simple 2-node network of brokers.  I
will have both consumers & producers each connected to one of the nodes
(randomly), and I'd like messages to flow to any consumer connected to
either node.

Assume "node1" and "node2" are the hostnames, and consumers and producers
will connect with:
failover:(tcp://node1:61616,tcp://node2:61616)?randomize=true

I'm wondering which of the following configurations would be "preferred", if
there are any advantages or disadvantages to either:

=== Option 1: only one node specifically configured for network, i.e.

node1 is set up with no networkConnector, just a stock out-of-the-box,
otherwise standalone broker.
node2 is set up with:
      <networkConnector uri="static:(tcp://node1:61616)" duplex="true"/>

=== Option 2: both nodes aware of each other, i.e.

node1 is set up with:
      <networkConnector uri="static:(tcp://node2:61616)"/>
node2 is set up with:
      <networkConnector uri="static:(tcp://node1:61616)"/>

Any advice on this?  I want to make sure I understand the purpose of
"duplex".  If my suggestions above imply that I'm clueless about it, please
clue me in...  :-)

Thanks!

-----
Dan Checkoway
dcheckoway gmail com
--
View this message in context: http://activemq.2283324.n4.nabble.com/Preferred-config-for-2-node-network-of-brokers-tp3795676p3795676.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Preferred config for 2-node network of brokers?

Posted by dcheckoway <dc...@gmail.com>.
Torsten,

I really appreciate your advice.  To be honest, we came to the same
conclusion originally, but master/slave seems to be doing buggy things,
which is one reason why I've been motivated to move away from it.

I sent an email to this list about the bugs, trying to figure out if what I
was seeing was legit or not, but I never got a reply.  I understand the
nature of this list...you get what you pay for and all that...but if you
guys have time to take a look at the master/slave issue I'm seeing, and at
least sanity check the config, that would be much appreciated!

http://activemq.2283324.n4.nabble.com/Slave-not-replicating-consumption-with-Pure-Master-Slave-td3767086.html

I'll revive that thread in case email is easier.

Thanks!

On Thu, Sep 8, 2011 at 3:33 AM, Torsten Mielke-2 [via ActiveMQ] <
ml-node+3798076-2111902585-140184@n4.nabble.com> wrote:

> If you want to achieve fault tolerance with failover, then master/slave is
> the way to go.
> Using a network of brokers your clients can still failover to another
> broker instance in the cluster but the state of each broker will not get
> replicated across your network. Every broker will have its own state and
> clients that failover to a different broker instance in the network might
> not receive all msgs.
>
> Broker networks are rather used for load balancing and scaling and are
> not/less suitable for fault tolerance and high availability.
>
>
> Torsten Mielke
> [hidden email] <http://user/SendEmail.jtp?type=node&node=3798076&i=0>
> [hidden email] <http://user/SendEmail.jtp?type=node&node=3798076&i=1>
>
>
> On Sep 7, 2011, at 10:47 PM, dcheckoway wrote:
>
> > Thanks Gary.
> >
> > I'm considering switching a master/slave setup (in which the master is
> > stock, out of the box, config) over to network of brokers.  Based on your
>
> > reply, it sounds like I can simply reconfigure the slave -- changing it
> from
> > slaving to using a duplex networkConnector -- and I won't have to touch
> the
> > existing master.  It will automatically change its role to become a
> member
> > of the 2-node network.
> >
> > My goal, fwiw, is to better utilize the 2nd node (currently just sitting
> > there slaving with no producers/consumers connected) and to move away
> from
> > master/slave.
> >
> > Does all of this sound sane, or am I slightly off the mark in terms of
> how
> > I'm going about it?
> >
> > Thanks!
>
>
>
>
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://activemq.2283324.n4.nabble.com/Preferred-config-for-2-node-network-of-brokers-tp3795676p3798076.html
>  To unsubscribe from Preferred config for 2-node network of brokers?, click
> here<http://activemq.2283324.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=3795676&code=ZGNoZWNrb3dheUBnbWFpbC5jb218Mzc5NTY3Nnw3MDc4NzEwMTU=>.
>
>


-----
Dan Checkoway
dcheckoway gmail com
--
View this message in context: http://activemq.2283324.n4.nabble.com/Preferred-config-for-2-node-network-of-brokers-tp3795676p3798602.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Preferred config for 2-node network of brokers?

Posted by Torsten Mielke <to...@fusesource.com>.
If you want to achieve fault tolerance with failover, then master/slave is the way to go. 
Using a network of brokers your clients can still failover to another broker instance in the cluster but the state of each broker will not get replicated across your network. Every broker will have its own state and clients that failover to a different broker instance in the network might not receive all msgs.

Broker networks are rather used for load balancing and scaling and are not/less suitable for fault tolerance and high availability.


Torsten Mielke
torsten@fusesource.com
tmielke@blogspot.com


On Sep 7, 2011, at 10:47 PM, dcheckoway wrote:

> Thanks Gary.
> 
> I'm considering switching a master/slave setup (in which the master is
> stock, out of the box, config) over to network of brokers.  Based on your
> reply, it sounds like I can simply reconfigure the slave -- changing it from
> slaving to using a duplex networkConnector -- and I won't have to touch the
> existing master.  It will automatically change its role to become a member
> of the 2-node network.
> 
> My goal, fwiw, is to better utilize the 2nd node (currently just sitting
> there slaving with no producers/consumers connected) and to move away from
> master/slave.
> 
> Does all of this sound sane, or am I slightly off the mark in terms of how
> I'm going about it?
> 
> Thanks!





Re: Preferred config for 2-node network of brokers?

Posted by dcheckoway <dc...@gmail.com>.
Thanks Gary.

I'm considering switching a master/slave setup (in which the master is
stock, out of the box, config) over to network of brokers.  Based on your
reply, it sounds like I can simply reconfigure the slave -- changing it from
slaving to using a duplex networkConnector -- and I won't have to touch the
existing master.  It will automatically change its role to become a member
of the 2-node network.

My goal, fwiw, is to better utilize the 2nd node (currently just sitting
there slaving with no producers/consumers connected) and to move away from
master/slave.

Does all of this sound sane, or am I slightly off the mark in terms of how
I'm going about it?

Thanks!

On Wed, Sep 7, 2011 at 1:23 PM, Gary Tully [via ActiveMQ] <
ml-node+3796717-255284436-140184@n4.nabble.com> wrote:

> both of those options are largely the same.
>
> The idea of duplex is that a spoke broker only needs to know about a
> hub broker to get a bidirectional networks and a single connection is
> shared for forwarding in either direction.
> When there is a firewall in between, only one port needs to be opened
> so duplex is easier to configure in this case.
>
> With each configuring a static networkconnector to the other, there
> are two unidirectional network connections.
>
> On 7 September 2011 10:28, dcheckoway <[hidden email]<http://user/SendEmail.jtp?type=node&node=3796717&i=0>>
> wrote:
>
> > Hello,
> >
> > I'd like your advice on setting up a simple 2-node network of brokers.  I
>
> > will have both consumers & producers each connected to one of the nodes
> > (randomly), and I'd like messages to flow to any consumer connected to
> > either node.
> >
> > Assume "node1" and "node2" are the hostnames, and consumers and producers
>
> > will connect with:
> > failover:(tcp://node1:61616,tcp://node2:61616)?randomize=true
> >
> > I'm wondering which of the following configurations would be "preferred",
> if
> > there are any advantages or disadvantages to either:
> >
> > === Option 1: only one node specifically configured for network, i.e.
> >
> > node1 is set up with no networkConnector, just a stock out-of-the-box,
> > otherwise standalone broker.
> > node2 is set up with:
> >      <networkConnector uri="static:(tcp://node1:61616)" duplex="true"/>
> >
> > === Option 2: both nodes aware of each other, i.e.
> >
> > node1 is set up with:
> >      <networkConnector uri="static:(tcp://node2:61616)"/>
> > node2 is set up with:
> >      <networkConnector uri="static:(tcp://node1:61616)"/>
> >
> > Any advice on this?  I want to make sure I understand the purpose of
> > "duplex".  If my suggestions above imply that I'm clueless about it,
> please
> > clue me in...  :-)
> >
> > Thanks!
> >
> > -----
> > Dan Checkoway
> > dcheckoway gmail com
> > --
> > View this message in context:
> http://activemq.2283324.n4.nabble.com/Preferred-config-for-2-node-network-of-brokers-tp3795676p3795676.html
> > Sent from the ActiveMQ - User mailing list archive at Nabble.com.
> >
>
>
>
> --
> http://fusesource.com
> http://blog.garytully.com
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://activemq.2283324.n4.nabble.com/Preferred-config-for-2-node-network-of-brokers-tp3795676p3796717.html
>  To unsubscribe from Preferred config for 2-node network of brokers?, click
> here<http://activemq.2283324.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=3795676&code=ZGNoZWNrb3dheUBnbWFpbC5jb218Mzc5NTY3Nnw3MDc4NzEwMTU=>.
>
>


-----
Dan Checkoway
dcheckoway gmail com
--
View this message in context: http://activemq.2283324.n4.nabble.com/Preferred-config-for-2-node-network-of-brokers-tp3795676p3797227.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Preferred config for 2-node network of brokers?

Posted by Gary Tully <ga...@gmail.com>.
both of those options are largely the same.

The idea of duplex is that a spoke broker only needs to know about a
hub broker to get a bidirectional networks and a single connection is
shared for forwarding in either direction.
When there is a firewall in between, only one port needs to be opened
so duplex is easier to configure in this case.

With each configuring a static networkconnector to the other, there
are two unidirectional network connections.

On 7 September 2011 10:28, dcheckoway <dc...@gmail.com> wrote:
> Hello,
>
> I'd like your advice on setting up a simple 2-node network of brokers.  I
> will have both consumers & producers each connected to one of the nodes
> (randomly), and I'd like messages to flow to any consumer connected to
> either node.
>
> Assume "node1" and "node2" are the hostnames, and consumers and producers
> will connect with:
> failover:(tcp://node1:61616,tcp://node2:61616)?randomize=true
>
> I'm wondering which of the following configurations would be "preferred", if
> there are any advantages or disadvantages to either:
>
> === Option 1: only one node specifically configured for network, i.e.
>
> node1 is set up with no networkConnector, just a stock out-of-the-box,
> otherwise standalone broker.
> node2 is set up with:
>      <networkConnector uri="static:(tcp://node1:61616)" duplex="true"/>
>
> === Option 2: both nodes aware of each other, i.e.
>
> node1 is set up with:
>      <networkConnector uri="static:(tcp://node2:61616)"/>
> node2 is set up with:
>      <networkConnector uri="static:(tcp://node1:61616)"/>
>
> Any advice on this?  I want to make sure I understand the purpose of
> "duplex".  If my suggestions above imply that I'm clueless about it, please
> clue me in...  :-)
>
> Thanks!
>
> -----
> Dan Checkoway
> dcheckoway gmail com
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/Preferred-config-for-2-node-network-of-brokers-tp3795676p3795676.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>



-- 
http://fusesource.com
http://blog.garytully.com