You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Emily Johnson <ha...@gmail.com> on 2015/11/03 06:27:42 UTC

Active MQ cluster behind load balancer

Hello All,

Need clarification on working of ActiveMQ cluster.
When a network of brokers is created are the connectiosn also shared?

For eg. If I make a connection with server1 can I use this object and
createsession on server2.
Will server2 know of the connection with server1.

Regards,
Emily



--
View this message in context: http://activemq.2283324.n4.nabble.com/Active-MQ-cluster-behind-load-balancer-tp4703618.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Active MQ cluster behind load balancer

Posted by Tim Bain <tb...@alumni.duke.edu>.
A single connection is a single TCP socket, which goes to a single remote
machine.  There is no way to load balance a single connection across
multiple brokers.  Either accept all clients being on the same broker or
create multiple connections.

Tim
On Nov 15, 2015 11:55 PM, "Emily Johnson" <ha...@gmail.com> wrote:

> Hey Tim,
>
> Sorry for replying late, was struck in some personal issues and was off
> work.
> Yes exactly, I am trying to achieve the first target, multiple clients on
> single connection.
>
> I have been trying to find a solution that works, even as a prototype and I
> will customize it if needed.
> But no avail yet.
>
> Any guidance in this matter is highly appreciated.
>
> Emily
>
>
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/Active-MQ-cluster-behind-load-balancer-tp4703618p4703975.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>

Re: Active MQ cluster behind load balancer

Posted by Emily Johnson <ha...@gmail.com>.
Hey Tim,

Sorry for replying late, was struck in some personal issues and was off
work.
Yes exactly, I am trying to achieve the first target, multiple clients on
single connection.

I have been trying to find a solution that works, even as a prototype and I
will customize it if needed.
But no avail yet.

Any guidance in this matter is highly appreciated.

Emily



--
View this message in context: http://activemq.2283324.n4.nabble.com/Active-MQ-cluster-behind-load-balancer-tp4703618p4703975.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Active MQ cluster behind load balancer

Posted by Tim Bain <tb...@alumni.duke.edu>.
What are you trying to load balance?  (Which is another way of asking,
what's your topology/configuration/scenario?)  Many clients on a single
connection?  Many separate connections from the same process?  From the
same host?  From different hosts?

I would expect that all but the first of those could be successfully load
balanced using the traditional techniques if the load balancer was
configured appropriately (and in the first situation, split into multiple
connections within the process to get to the second scenario), but network
load balancers aren't my area of expertise so maybe it's not as easy as I
would assume.

Tim
On Nov 3, 2015 10:38 PM, "Emily Johnson" <ha...@gmail.com> wrote:

> Thanks Tim and Jean,
>
> Your quick response is highly appreciated.
> I guess I phrased my question wrong.
> I would like to load balance my connections, what are the suggestions to
> achieve the same.
> The traditional connection approach will not work for the same reason that
> connection once established would remain established with same broker.
> REST services ?
> Thanks again for your time and effort.
>
> Regards,
> Emily
>
>
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/Active-MQ-cluster-behind-load-balancer-tp4703618p4703648.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>

Re: Active MQ cluster behind load balancer

Posted by Emily Johnson <ha...@gmail.com>.
Thanks Tim and Jean,

Your quick response is highly appreciated.
I guess I phrased my question wrong.
I would like to load balance my connections, what are the suggestions to
achieve the same.
The traditional connection approach will not work for the same reason that
connection once established would remain established with same broker.
REST services ?
Thanks again for your time and effort.

Regards,
Emily



--
View this message in context: http://activemq.2283324.n4.nabble.com/Active-MQ-cluster-behind-load-balancer-tp4703618p4703648.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Active MQ cluster behind load balancer

Posted by Tim Bain <tb...@alumni.duke.edu>.
Emily,

The load balancer will route a given client's connection to a single
broker, with which your client will have all interactions.  The other
broker will not interact directly with the client, but since you say your
brokers are networked, messages can pass from a client on one broker to a
client on the other broker.

Tim
On Nov 3, 2015 12:15 AM, "Jean-Baptiste Onofré" <jb...@nanthrax.net> wrote:

> Hi Emily,
>
> Let me illustrate:
> - if you use a load balancer (Cisco, Juniper, F5, ...), you will load
> balance the connections. With JMS, the messages are not directly sent via
> the connection, but via sessions inside a connection. So basically, when
> you use tcp, the same connection is used to produce or consume bunch of
> messages.
> - a network of brokers will load balance the messages.
>
> I hope it helps.
>
> Regards
> JB
>
> On 11/03/2015 06:27 AM, Emily Johnson wrote:
>
>> Hello All,
>>
>> Need clarification on working of ActiveMQ cluster.
>> When a network of brokers is created are the connectiosn also shared?
>>
>> For eg. If I make a connection with server1 can I use this object and
>> createsession on server2.
>> Will server2 know of the connection with server1.
>>
>> Regards,
>> Emily
>>
>>
>>
>> --
>> View this message in context:
>> http://activemq.2283324.n4.nabble.com/Active-MQ-cluster-behind-load-balancer-tp4703618.html
>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>>
>>
> --
> Jean-Baptiste Onofré
> jbonofre@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com
>

Re: Active MQ cluster behind load balancer

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi Emily,

Let me illustrate:
- if you use a load balancer (Cisco, Juniper, F5, ...), you will load 
balance the connections. With JMS, the messages are not directly sent 
via the connection, but via sessions inside a connection. So basically, 
when you use tcp, the same connection is used to produce or consume 
bunch of messages.
- a network of brokers will load balance the messages.

I hope it helps.

Regards
JB

On 11/03/2015 06:27 AM, Emily Johnson wrote:
> Hello All,
>
> Need clarification on working of ActiveMQ cluster.
> When a network of brokers is created are the connectiosn also shared?
>
> For eg. If I make a connection with server1 can I use this object and
> createsession on server2.
> Will server2 know of the connection with server1.
>
> Regards,
> Emily
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/Active-MQ-cluster-behind-load-balancer-tp4703618.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com