RabbitMQ-奇怪的同步行为 [英] RabbitMQ - strange synchronization behavior

查看:143
本文介绍了RabbitMQ-奇怪的同步行为的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个简单的RabbitMQ群集,其中包含2个物理相同的Linux节点:(CentOS,RabbitMQ 3.1.5,Erlang R15B,2GB Ram,CPU 1xCore).节点的镜像和同步已打开.

I have simple RabbitMQ cluster with 2 physical identical linux nodes: (CentOS, RabbitMQ 3.1.5, Erlang R15B, 2GB Ram, CPU 1xCore). Mirroring and synchronization of nodes is turned on.

我有两个困扰我的问题:

I have two problems which bothers me:

  1. 在正常情况下,一切都很好,但是在重新启动一个节点(通过命令行中的stop_app和start_app)之后,整个群集对于生产者和消费者均不可用-我无法产生或接收来自同步期间排队.这种情况正常吗?

  1. In a normal situation everything is fine, but after restarting one of the nodes(by stop_app and start_app in the commandline) the whole cluster becomes unavaible to producers and consumers - I can't produce or receive messages from a queue during synchronization. Is this situation normal?

在同步期间,我观察到从属节点(已重新启动的节点)上的CPU负载非常高(几乎100%).我测量了同步速度-同步速度非常低(200万条消息的同步需要3个小时以上的时间).这很奇怪,因为产生这种数量的东西要少得多.这种情况也正常吗?

During synchronization I observed very high CPU load (almost 100%) on the slave node(that which was restarted). I measured the speed of synchronization - it's dramatic low (synchronization of 2 millions of messages takes above 3 hours). It's strange because producing of such amount takes much less. Is this situation normal too?

推荐答案

我最近负责研究工作中的RabbitMQ,因此在文档中也有深入的介绍.

I've recently been tasked with looking into RabbitMQ at work and so have been deep in the documentation.

  1. 同步时就是这种情况.这是RabbitMQ HA文档的摘录,此处.

如果将队列设置为自动同步,它将进行同步 每当有新的奴隶加入时-直到完成后才变得无响应 如此.

  • 如果正在从磁盘读取消息并将消息持久存储到磁盘(通过选择或通过内存限制),则可能会有开销.您可以在博客条目(这是评论之前的最后一个图表),它表明在读取和写入这么多消息的队列时性能会发生变化.这些图表适用于RabbitMQ的旧版本,但我没有看到任何最新的版本.
  • If a queue is set to automatically synchronise it will synchronise whenever a new slave joins - becoming unresponsive until it has done so.

  • If the messages are being read-from and persisted-to disk (either through choice or through memory limitations) there may be overhead there. You can see a chart on this blog entry (it's the last chart before the comments) which indicates that there are performance changes when reading from and writing to queues of that many messages. These charts are for older versions of RabbitMQ but I've not seen anything more recent.
  • 希望这会有所帮助!

    Hope this helps!

    这篇关于RabbitMQ-奇怪的同步行为的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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