zoukankan      html  css  js  c++  java
  • RabbitMQ compare with redis and MSMQ

    Redis Vs RabbitMQ as a data broker/messaging system in between Logstash and elasticsearch

    回答1

    After evaluating both Redis and RabbitMQ I chose RabbitMQ as our broker for the following reasons:

    1. RabbitMQ allows you to use a built in layer of security by using SSL certificates to encrypt the data that you are sending to the broker and it means that no one will sniff your data and have access to your vital organizational data.
    2. RabbitMQ is a very stable product that can handle large amounts of events per seconds and many connections without being the bottle neck.
    3. In our organization we already used RabbitMQ and had good internal knowledge about using it and an already prepared integration with chef.

    Regarding scaling, RabbitMQ has a built in cluster implementation that you can use in addition to a load balancer in order to implement a redundant broker environment.

    Is my RabbitMQ cluster Active Active or Active Passive?

    Now to the weaker point of using RabbitMQ:

    1. most Logstash shippers do not support RabbitMQ but on the other hand, the best one, named Beaver, has an implementation that will send data to RabbitMQ without a problem.
    2. The implementation that Beaver has with RabbitMQ in its current version is a little slow on performance (for my purposes) and was not able to handle the rate of 3000 events/sec from one server and from time to time the service crashed.
    3. Right now I am working on a fix that will solve the performance problem for RabbitMQ and make the Beaver shipper more stable. The first solution is to add more processes that can run simultaneously and will give the shipper more power. The second solution is to change Beaver to send data to RabbitMQ asynchronously which theoretically should be much faster. I hope that I’ll finish implementing both solutions by the end of this week.

    You can follow the issue here: https://github.com/josegonzalez/python-beaver/issues/323

    And check the pull request here: https://github.com/josegonzalez/python-beaver/pull/324

    If you have more questions feel free to leave a comment.

    回答2

    Redis is created as a key value data store despite having some basic message broker capabilities.

    RabbitMQ is created as a message broker. It has lots of message broker capabilities naturally.

    回答3

    I have been doing some research on this topic. If performance is important and persistence is not, RabbitMQ is a perfect choice. Redis is a technology developed with a different intent.

    Following is a list of pros for using RabbitMQ over Redis:

    • RabbitMQ uses Advanced Message Queuing Protocol (AMQP) which can be configured to use SSL, additional layer of security.
    • RabbitMQ takes approximately 75% of the time Redis takes in accepting messages.
    • RabbitMQ supports priorities for messages, which can be used by workers to consume high priority messages first.
    • There is no chance of loosing the message if any worker crashes after consuming the message, which is not the case with Redis.
    • RabbitMQ has a good routing system to direct messages to different queues.

    A few cons for using RabbitMQ:

    • RabbitMQ might be a little hard to maintain, hard to debug crashes.
    • node-name or node-ip fluctuations can cause data loss, but if managed well, durable messages can solve the problem.

    Comparison between RabbitMQ and MSMQ

    I wrote a blog post a while back comparing MSMQ and RabbitMQ (among others):

    http://mikehadlow.blogspot.co.uk/2011/04/message-queue-shootout.html

    RabbitMQ gave slightly better performance than MSMQ, but both were comprehensively out performed by ZeroMQ. If performance is your main criteria, you should definitely look at ZeroMQ.

    It's worth noting that RabbitMQ and MSMQ are very different beasts. MSMQ is a simple store-and-forward queue. It doesn't provide any messaging patterns, such as pub/sub, or routing. For anything beyond simple point-to-point messaging you'd probably want to use a service bus library such as NServiceBus or MassTransit on top of MSMQ.

    RabbitMQ is a sophisticated server product that provides complex messaging patterns, topics and routing out-of-the-box. You also get centralized management and DR, something you'd have to implement yourself if you chose MSMQ.

  • 相关阅读:
    aptana中删除空行
    css预处理的引入与问题
    rsyslog 服务器重启后 发现不能接受到外部日志 只能接受本地日志 关闭防火墙即可
    php访问其他网站接口
    mysql 表查询结果 总行数计算
    linux centos 恢复 还原 备份 Snapper 快照说明
    linux 服务 启动 关闭 列表
    linux yum 安装 卸载
    php7 mysql_pconnect() 缺失 解决方法
    搭建一个免费的,无限流量的Blog----github Pages和Jekyll入门
  • 原文地址:https://www.cnblogs.com/chucklu/p/13048249.html
Copyright © 2011-2022 走看看