[rabbitmq-discuss] ConnectionFactory and load balancing
simon at rabbitmq.com
Wed Jan 11 11:30:14 GMT 2012
The cluster will connect consumers to the "master" node anyway. In
theory it's likely to be more performant if you connect directly to the
master node, but in practice I suspect the difference would be fairly minor.
Getting load balancing on a mirrored queue doesn't really make much
sense as a concept since *all* the mirrors need to do *all* the work
anyway - there's no real load to balance.
On 10/01/12 19:57, Adam Rabung wrote:
> Let me restate :)
> Connection.newConnection(Address) seems to be the best way, short of
> using HAProxy, to safely attain a connection to a cluster in the
> presence of nodes going down. When we are mirroring queues across a
> cluster, is it important to connect to the "master" node for a queue, or
> should we randomize the Address to achieve some load balancing?
> Any feedback appreciated,
> On Mon, Jan 9, 2012 at 5:03 PM, Adam Rabung <adamrabung at gmail.com
> <mailto:adamrabung at gmail.com>> wrote:
> > Hi,
> > I am running an active/active cluster. The newConnection(Address)
> > method of ConnectionFactory takes an array of addresses to try to
> > connect to, in order. If I'd like to avoid HAProxy for now, it seems
> > like it would be wise for me to randomize this array of Addresses
> > before calling newConnection, to achieve some degree of load
> > balancing. Is that a worthwhile approach?
> > Thank you,
> > Adam
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com
More information about the rabbitmq-discuss