Search code examples
performancerabbitmqcluster-computingload-balancingscalability

How to make RabbitMQ scalable?


I tried to test RabbitMQ, but I found that rabbitmq has some problems: if I created a cluster of 3 nodes, I can't publish/delivered more than 6000/s. in other hand, if I worked with one single node, I can publish/delivery until 25000/s. which means, more that I add nodes, more performance is deteriorating.

but from this article : https://blog.pivotal.io/pivotal/products/rabbitmq-hits-one-million-messages-per-second-on-google-compute-engine

they can publish more than 1 million, so how they can do that? I want to make RabbitMQ process more than 1 million messages per second


Solution

  • I resolved the problem by adding load balancer. The producers send data to load balancer. On the other hand the load balancer id connected to many nodes of rabbitmq, but those nodes are not connected between them (to avoid synchronization which affects the performance). So by this way, I can multiply the throughput (ex: 3 nodes= 3x throughput).