<div dir="ltr">We have a routing scheme in which (initially) messages will route to 1 of 10,000 bindings in a set. There are many such sets.<div><br></div><div>The key is a pseudo-random whole number in the decimal range up to 10,000,000.</div>
<div><br></div><div>The plan is to represent the bindings and routing keys in a way that results in a compact and fast trie structure within rabbitmq by separating each digit with a &#39;.&#39;, e.g. for a typical key like &#39;1234567&#39; the routing key would be &#39;1.2.3.4.5.6.7&#39; if expressed in decimal.</div>
<div><br></div><div>But of course the key could be expressed in another base, affecting the breadth and depth of the trie, e.g. &#39;5.B.A.N&#39; in base 62. A base in the range of 10 to 62 is probably reasonable.</div><div>
<br></div><div>So for my range, base 10 has a span of 10 and a depth of 9 while base 62 has a span of 62 and a depth of 4. Any thoughts about where the optimum lies?</div><div><br></div><div>Actually, after writing this I realize that I have answered my own question: since in my case each set of bindings is a random, sparse representation of the domain, minimizing depth will tend to form a better trie for any one set - use base 62.</div>
<div><br></div><div>But perhaps the list will find this interesting anyway.</div><div><br></div><div>ml</div></div>