<div dir="ltr">Matthew,<br><br>Let&#39;s say RAM can fit all my bindings and that I&#39;m using fixed sized values with direct exchanges.<br>Assuming that the incoming and outgoing number of messages is constant, should I expect the performance to degrade as the number of� bindings increases or will it stay the same?<br>
In other words, does a large number of queues, exchanges and bindings affect the load even when <br>most of them aren&#39;t being used?<br><br>Ben<br><br><br><br><div class="gmail_quote">On Mon, Feb 1, 2010 at 3:43 PM, Matthew Sackman <span dir="ltr">&lt;<a href="mailto:matthew@lshift.net">matthew@lshift.net</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;">Hi Ben,<br>
<div class="im"><br>
On Mon, Feb 01, 2010 at 07:58:52AM +0200, Ben Browitt wrote:<br>
&gt; Do I have to keep all bindings in memory or is there a mode where rabbitmq<br>
&gt; can read binding keys from disk when needed?<br>
<br>
</div>I&#39;m afraid bindings are all kept in RAM. The binding record is quite<br>
small (dependent on the size of the exchange name, binding key, queue<br>
name and any args - minimising these will help reduce memory foot print)<br>
so you should be able to fit quite a lot of them in RAM:<br>
<br>
&gt; erts_debug:flat_size(#binding{exchange_name = &lt;&lt;&quot;my_exchange&quot;&gt;&gt;, queue_name = &lt;&lt;&quot;my_queue&quot;&gt;&gt;, key = &lt;&lt;&quot;my_key&quot;&gt;&gt;, args = []}).<br>
24<br>
<br>
So just 24 bytes for that record, though obviously with padding and<br>
longer field values, this will grow. Fixed size values here would help -<br>
if for example you&#39;re able to use md5sums to get the exchange name and<br>
queue name, and only use fanout or direct exchanges, and thus have an<br>
fixed sized hash for the binding key too, then that&#39;ll make estimations<br>
easier.<br>
<br>
If you can estimate given, say, twice your expected number of visitors<br>
and twice the expected number of articles they subscribe to how many<br>
bindings that would result in, then you may be able to satisfy yourself<br>
whether or not this is going to be a problem.<br>
<br>
Whilst the new persister is able to page messages out to disk, we have<br>
no plans just at the moment to be able to do the same for bindings.<br>
<br>
Please let us know how you get on.<br>
<br>
Matthew<br>
<br>
_______________________________________________<br>
rabbitmq-discuss mailing list<br>
<a href="mailto:rabbitmq-discuss@lists.rabbitmq.com">rabbitmq-discuss@lists.rabbitmq.com</a><br>
<a href="http://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss" target="_blank">http://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss</a><br>
</blockquote></div><br></div>