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

查看:40
本文介绍了如何使 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 每秒处理超过 100 万条消息

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天全站免登陆