Hi,<br><br>On this mailing list, Jon had described once that they use a setup like this:<br><br><b>Haproxy as a TCP proxy sitting in front of the RabbitMQ clustered servers and acts as a failover and load balancer mechanism.<br>

The clustered RabbitMQ instances use the standard RabbitMQ clustering mechanism and have
 the same queues, exchanges, and whatnot on each box.<br></b><br>However, here on the rabbitQM mailing list, I got to know that: queues are not replicated on all the nodes. Instead the queue remain specific to the node on which it was declared.<br>

<br>For millions of messages handling capability, I want a very similar setup like Jon&#39;s, along with the active-passive ability of those RabbitMQ instances , so that means a setup like this:<br><br><b>HA proxy-&gt;3 Clustered RabbitMQ instances-&gt;Each RabbitMQ instance is having an independent HA active-passive setup (i.e. effectively 6 instances).......<br>

</b><br>Does this look scalable ? Am I missing something ? Anything else I can add/replace....<br><br>Many thanks,<br>Kshitiz Garg<br><br><br><br><div class="gmail_quote">On Mon, Nov 1, 2010 at 7:12 PM, Jon Brisbin <span dir="ltr">&lt;<a href="mailto:jon.brisbin@npcinternational.com" target="_blank">jon.brisbin@npcinternational.com</a>&gt;</span> wrote:<br>



<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div><br>
On Oct 30, 2010, at 3:28 AM, Kshitiz Garg wrote:<br>
<br>
&gt; Now if I use a HA proxy and have independent RabbitMQs sitting behind<br>
&gt; that proxy, how will that be different from using a HA proxy and have<br>
&gt; clustered RabbitMQs sitting behind that proxy. What is that these<br>
&gt; clustered RabbitMQs have in common? �Actually I want to understand<br>
&gt; &quot;clustering&quot; in this regard.<br>
<br>
</div>If the brokers aren&#39;t clustered, your individual RabbitMQ brokers won&#39;t share users, exchanges, queues, or any other resource. I&#39;m not sure how that affects applications because I haven&#39;t tried it. I suspect it wouldn&#39;t work very well with round-robin load balancing because consumers might get connected to a different broker than the producers.<br>




<br>
If you&#39;re using only the failover configuration, though, it would be better. You&#39;d just have to reestablish all your Channels if one of them gets disconnected, assuming the next connection will go to the other broker.<br>




<br>
&quot;Clustered&quot; RabbitMQ brokers look the same no matter which actual broker you contact. Messages delivered to one broker will be delivered to consumers on another broker. Without this clustering, you have to create some kind of store-and-forward (maybe using the shovel plugin) or your application has to manage that itself.<br>




<br>
If your brokers are clustered, upgrading versions of the broker is, in my experience, fragile. Every version upgrade I&#39;ve done (we&#39;re running it on Ubuntu Linux) results in a dead broker that has to be manually restarted. I&#39;ve also had to re-configure the broker back into the cluster more times than I&#39;d like.<br>




<br>
&lt;soapbox&gt;<br>
The broker upgrade process could use some attention, IMHO. The broker should restart after upgrades without manual intervention and new versions should ALWAYS be able to migrate data so I don&#39;t have to reconfigure all my users and clustering configuration.<br>




&lt;/soapbox&gt;<br>
<font color="#888888"><br>
jb<br>
</font><div><div></div><div><br>
<br>
&gt;<br>
&gt; Thanks,<br>
&gt; Kshitiz Garg<br>
&gt;<br>
&gt;<br>
&gt; On Fri, Oct 29, 2010 at 7:12 PM, Jon Brisbin<br>
&gt; &lt;<a href="mailto:jon.brisbin@npcinternational.com" target="_blank">jon.brisbin@npcinternational.com</a>&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt; On Oct 29, 2010, at 8:31 AM, Kshitiz Garg wrote:<br>
&gt;&gt;<br>
&gt;&gt;&gt; Should I refer to &quot;RabbitMQ High Availability Guide&quot; for setting up a<br>
&gt;&gt;&gt; system like yours?<br>
&gt;&gt;<br>
&gt;&gt; It&#39;s certainly a good idea to read that guide. But I&#39;m using an intentionally simplistic setup that follows the transcript here:<br>
&gt;&gt;<br>
&gt;&gt; <a href="http://www.rabbitmq.com/clustering.html#creating" target="_blank">http://www.rabbitmq.com/clustering.html#creating</a><br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;&gt; does &quot;haproxy&quot; automatically decides the routing of<br>
&gt;&gt;&gt; the message depending on the availability of rabbitMQ instances<br>
&gt;&gt;&gt; sitting behind this ?<br>
&gt;&gt;<br>
&gt;&gt; Sort of. HAProxy is a TCP/IP &quot;traffic cop&quot;. It knows nothing about the contents of the packets it proxies. It simply knows whether or not any of the configured backends is alive and able to receive data.<br>




&gt;&gt;<br>
&gt;&gt; Maybe a better way to say it is that it decides the routing of the TCP traffic to the broker. It knows nothing about messages.<br>
&gt;&gt;<br>
&gt;&gt; <a href="http://haproxy.1wt.eu/" target="_blank">http://haproxy.1wt.eu/</a><br>
&gt;&gt;<br>
&gt;&gt; I&#39;m also using a &quot;best effort&quot; approach. I&#39;m not going to get my britches in a wrinkle if my broker goes down for a few minutes (or a few hours ;) until I get it fixed. I recognize others don&#39;t have that luxury.<br>




&gt;&gt;<br>
&gt;&gt; jb<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Regards,<br>
&gt;&gt;&gt; Kshitiz<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; On Fri, Oct 29, 2010 at 6:39 PM, Jon Brisbin<br>
&gt;&gt;&gt; &lt;<a href="mailto:jon.brisbin@npcinternational.com" target="_blank">jon.brisbin@npcinternational.com</a>&gt; wrote:<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; Do you want failover or clustering (or both)?<br>
&gt;&gt;&gt;&gt; I use both. I have haproxy as a TCP proxy that sits in front of the RabbitMQ servers and acts as a failover and load balancer mechanism.<br>
&gt;&gt;&gt;&gt; Behind the proxy are clustered RabbitMQ instances, which means they use the standard RabbitMQ clustering mechanism and have the same queues, exchanges, and whatnot on each box.<br>
&gt;&gt;&gt;&gt; I then use Spring AMQP to connect to the *proxy*, who decides which of the RabbitMQ instances I actually get connected to.<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; Jon Brisbin<br>
&gt;&gt;&gt;&gt; Portal Webmaster<br>
&gt;&gt;&gt;&gt; NPC International, Inc.<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; On Oct 29, 2010, at 1:27 AM, Kshitiz Garg wrote:<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; Hi,<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; I have just started working with RabbitMQ for my cloud messaging/eventing application. The proof of concept worked well with rabbitMQ and Spring AMQP. Now, I want to start preparing for scalability.<br>
&gt;&gt;&gt;&gt; I am able to setup a rabbitMQ cluster with 2 rabbitMQs installed on 2 separate machines. Now I want to know what is achieved by &quot;clustering&quot; in terms of rabbitMQ.<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; My spring amqp template has been given a connection Factory like this:<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; � � &lt;!-- RabbitMQ configurations --&gt;<br>
&gt;&gt;&gt;&gt; � � &lt;!-- Define a connectionFactory --&gt;<br>
&gt;&gt;&gt;&gt; � � &lt;bean id=&quot;connectionFactory&quot;<br>
&gt;&gt;&gt;&gt; � � � � class=&quot;org.springframework.amqp.rabbit.connection.SingleConnectionFactory&quot;&gt;<br>
&gt;&gt;&gt;&gt; � � � � &lt;constructor-arg value=&quot;localhost&quot; /&gt;<br>
&gt;&gt;&gt;&gt; � � � � &lt;property name=&quot;username&quot; value=&quot;guest&quot; /&gt;<br>
&gt;&gt;&gt;&gt; � � � � &lt;property name=&quot;password&quot; value=&quot;guest&quot; /&gt;<br>
&gt;&gt;&gt;&gt; � � &lt;/bean&gt;<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; � � &lt;!-- Configure the admin class --&gt;<br>
&gt;&gt;&gt;&gt; � � &lt;bean id=&quot;amqpAdmin&quot; class=&quot;org.springframework.amqp.rabbit.core.RabbitAdmin&quot;&gt;<br>
&gt;&gt;&gt;&gt; � � � � &lt;constructor-arg ref=&quot;connectionFactory&quot; /&gt;<br>
&gt;&gt;&gt;&gt; � � &lt;/bean&gt;<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; Here I have specified localhost, so now, if I send a amqp message through rabbitMQ and this localhost broker is not up, will that message go through its cluster node automatically ?<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; If that&#39;s the case, then what do we mean by high availability?<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; Thanks,<br>
&gt;&gt;&gt;&gt; Kshitiz Garg<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; _______________________________________________<br>
&gt;&gt;&gt;&gt; rabbitmq-discuss mailing list<br>
&gt;&gt;&gt;&gt; <a href="mailto:rabbitmq-discuss@lists.rabbitmq.com" target="_blank">rabbitmq-discuss@lists.rabbitmq.com</a><br>
&gt;&gt;&gt;&gt; <a href="https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss" target="_blank">https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss</a><br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; Jon Brisbin<br>
&gt;&gt; Portal Webmaster<br>
&gt;&gt; NPC International, Inc.<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
<br>
<br>
Jon Brisbin<br>
Portal Webmaster<br>
NPC International, Inc.<br>
<br>
<br>
<br>
</div></div></blockquote></div><br>