[rabbitmq-discuss] How to use HAProxy as a load balancer in RabbitMQ cluster?

Maruthavanan Subbarayan marutha.tech at gmail.com
Wed Nov 6 09:34:21 GMT 2013


Hi

You should be using xxx.xxx.xxx.xxx:5720 and haproxy will tkae care if
configured

Thanks
Marutha
On Nov 6, 2013 2:27 PM, "Rajasekhar P" <sekhar434145 at gmail.com> wrote:

> Thanks Marutha for the reply. Here, HAProxy is running on xxx.xxx.xxx.xxx
> machine and listening port is 5720 . While getting the connection at
> producer and consumer end, do we need to use this ip address or IP
> addresses where RabbitMQ nodes are running in cluster?
>
> CachingConnectionFactory connectionFactory = new CachingConnectionFactory(
> "xxx.xxx.xxx.xxx");
>
> (OR)
>
> CachingConnectionFactory connectionFactory = new
> CachingConnectionFactory();
> connectionFactory.setAddresses("ip_addr2:5672,ip_addr2:5672");
>
>
> Thanks in advance.
>
>
> On Wed, Nov 6, 2013 at 11:03 AM, Maruthavanan Subbarayan <
> marutha.tech at gmail.com> wrote:
>
>> Hi
>>
>> The load balancing should be taken care by HAproxy. Both producers and
>> consumers should point to HAproxy.
>>
>> Thanks
>> Marutha
>> On Nov 6, 2013 10:55 AM, "Rajasekhar P" <sekhar434145 at gmail.com> wrote:
>>
>>> Thanks for the response. We are new to using HAProxy and done the
>>> HAProxy setup as per the Rabbit_In_Action.pdf documentation. Here, HAProxy
>>> is installed in Linux and two RabbitMQ nodes are running in two different
>>> windows machines in cluster.
>>>
>>> If we are not making any changes related to HAProxy in producer and
>>> consumer code, how does load balancing will work. could you please tell me?
>>>
>>> Thank you.
>>>
>>>
>>> On Tue, Nov 5, 2013 at 6:44 PM, Michael Klishin <mklishin at gopivotal.com>wrote:
>>>
>>>>
>>>> On 5 Nov 2013, at 17:10, Rajasekhar P <sekhar434145 at gmail.com> wrote:
>>>>
>>>> > We are using HAProxy as a load balancer in RabbitMQ cluster and we
>>>> have done the configuration and able to see the stats, where it will
>>>> display list of running nodes.
>>>> > But, we want to know how to configure for connecting producer and
>>>> consumers and we working on Java client. Could anyone please share the
>>>> sample producer and consumer code which we can test via HAProxy load
>>>> balancer.
>>>>
>>>> The whole point of having a proxy is that clients don’t need to be
>>>> aware of the cluster topology.
>>>>
>>>> Your clients should connect to HAproxy. There is no difference to
>>>> connecting to a Rabbit node directly.
>>>>
>>>> MK
>>>>
>>>> Software Engineer, Pivotal/RabbitMQ
>>>>
>>>>
>>>> _______________________________________________
>>>> rabbitmq-discuss mailing list
>>>> rabbitmq-discuss at lists.rabbitmq.com
>>>> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
>>>>
>>>
>>>
>>> _______________________________________________
>>> rabbitmq-discuss mailing list
>>> rabbitmq-discuss at lists.rabbitmq.com
>>> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
>>>
>>>
>> _______________________________________________
>> rabbitmq-discuss mailing list
>> rabbitmq-discuss at lists.rabbitmq.com
>> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
>>
>>
>
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com
> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20131106/008017d6/attachment.htm>


More information about the rabbitmq-discuss mailing list