<div dir="ltr">Thank you so much, Simon, as always!<div><br></div><div>I learnt from the documentation that queues are single threaded resource. What does this mean to delivering and acknowledging messages? If prefetch_count=10.</div>
<div><br></div><div>Cross cluster traffic are they asynchronous?</div><div><br></div><div>Thanks!</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Feb 13, 2014 at 7:29 AM, Simon MacMullen <span dir="ltr"><<a href="mailto:simon@rabbitmq.com" target="_blank">simon@rabbitmq.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">On 13/02/14 06:25, Arun Rao wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
1. If I had 10 servers, will I achieve more throughput having 5 clusters<br>
(2 nodes each) compared to 2 clusters (5 nodes each)? I get into the<br>
grey area when i think if I had 5 servers in a cluster and all servers<br>
are taking traffic, then there could be more load syncing traffic across<br>
clusters?<br>
</blockquote>
<br></div>
The key question is really: "Where are your queues?" The question of how you arrange your nodes into clusters is actually quite secondary to this.<br>
<br>
Any given queue can only be on one node at once (in the case of an HA queue the master can only be on one node and the slaves contribute greater reliability but not greater throughput). And cross cluster traffic is not free.<br>

<br>
So if you only have one queue, you will get the best results if all publishers and consumers connect directly to that queue.<br>
<br>
If you have more than one queue, you'll benefit from sharing the queues across nodes. It's still always best if your consumers and producers connect to the same node as the queue is on. Obviously this can't always be arranged :-) but it should be followed as much as possible.<div class="">
<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
2. Will I benefit if I had publishers publishing to 3 servers out of 4<br>
servers (in a cluster) and consumers consuming from all 4 servers. This<br>
way the 4th server not in publisher's radar will be more effective in<br>
draining clusters queues?<br>
</blockquote>
<br></div>
Again, it depends where the queues are.<div class=""><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
3. Higher QoS Prefetch count and multiple acknowledgements.<br>
</blockquote>
<br></div>
At the moment, turning off prefetch (either don't use basic.qos or set prefetch_count to 0) is much faster, especially when consuming across a cluster (i.e. with the connection of a different node to the queue). This is because qos is shared between consuming queues on a channel, so we need to do a bit of coordination between cluster nodes just to figure out if we can deliver a message.<br>

<br>
We will have an improvement to this in 3.3.0.<br>
<br>
Acknowledgements with multiple=true will help somewhat, if only by reducing the amount of work your consuming connection / channel have to do. But the queue will have to do nearly as much work, so they are no panacea.<br>

<br>
Hope this helps.<br>
<br>
Cheers, Simon<span class="HOEnZb"><font color="#888888"><br>
<br>
<br>
-- <br>
Simon MacMullen<br>
RabbitMQ, Pivotal<br>
</font></span></blockquote></div><br></div>