[rabbitmq-discuss] ConnectionFactory and load balancing

Simon MacMullen 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.

Cheers, Simon

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,
> Adam
>
> 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
> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss


-- 
Simon MacMullen
RabbitMQ, VMware


More information about the rabbitmq-discuss mailing list