问题
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
回答1:
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).
回答2:
It might depend on other factors such as your network, or your hardware performance.
When reading benchmark always consider the environment surrounding the tests
As on how to improve perf you can improve your hardware or network if this is the limiting factor.
Consider switching to a SSD or using link aggregation on your network would be a good start.
来源:https://stackoverflow.com/questions/36650061/how-to-make-rabbitmq-scalable