[rabbitmq-discuss] Scaling with RabbitMQ

Michael Klishin mklishin at gopivotal.com
Tue Apr 22 19:34:50 BST 2014

On 22 April 2014 at 21:37:54, Björn Häuser (bjoernhaeuser at gmail.com) wrote:
> > 1. Topic exchange is the slowest exchange type. Direct exchange  
> would be faster. We would lose the ability to have wildcard bindings.  
> Can someone put a number of how much would we gain when we switch  
> to a direct exchange?

I’d recommend doing your own benchmarks instead of believing numbers
posted on the Internet.

> 2. Publishing rate depends on how many queues have a binding for  
> the published message. We use java class names as routing keys.  
> (com.foo.bar.xxx.zzz). The messages start to differ from the  
> xxx part. Does the structure of the routing key influences publishing  
> speed? What would be the impact of drastically increasing the  
> number of queues (and bindings)? I am thinking of having thousand  
> queues.

Topic routing uses a trie internally which doesn’t get much slower
as the number of bindings increases or topic length grows. However,
since every queue gets a copy of the message, there will be some impact,
in particular with larger messages.

> 3. Is it wise to run everything over the same exchange? As far as  
> I read on the mailing list, different exchanges on the same cluster  
> do not influence each other - as long as there are enough physical  
> resources.

Exchanges are just named routing tables. Using a single exchange vs multiple
exchanges of the same type should make no difference.

> 4. How do we know, that we hit some limit of rabbitmq by using it  
> the wrong way? Is there any way to see and monitor internal rabbitmq  
> metrics? What’s your favorite tool to monitor RabbitMQ?

RabbitMQ management UI and HTTP API that ships with it.

> 5. What do you think about having a Channel per Queue? That decision  
> made us able to set the prefetch size and thread count per queue  
> on the client side.

Every channel consumes a bit of RAM but it should work fine. 

Software Engineer, Pivotal/RabbitMQ

More information about the rabbitmq-discuss mailing list