如何使RabbitMQ可扩展? [英] How to make RabbitMQ scalable?

查看:103
本文介绍了如何使RabbitMQ可扩展?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试测试RabbitMQ,但发现Rabbitmq存在一些问题: 如果我创建了一个由3个节点组成的集群,则发布/交付的速度不能超过6000/s. 另一方面,如果我使用单个节点,则可以发布/传送直到25000/s. 这意味着,我添加更多的节点,更多的性能将会下降.

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.

但来自本文: https://blog.pivotal.io/pivotal/products/rabbitmq-hits-one-million-messages-per-second-on-google-compute-engine

他们可以发表超过100万本,那么他们该怎么做呢? 我想让RabbitMQ每秒处理超过一百万条消息

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

推荐答案

我通过添加负载均衡器解决了该问题. 生产者将数据发送到负载均衡器.另一方面,负载均衡器ID连接到Rabbitmq的许多节点,但是这些节点之间没有连接(以避免同步影响性能). 因此,通过这种方式,我可以将吞吐量提高一倍(例如:3个节点= 3倍的吞吐量).

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).

这篇关于如何使RabbitMQ可扩展?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆