In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces what is the difference between redis and rabbitmq, the article is very detailed, has a certain reference value, interested friends must read it!
This paper only compares the situation of queue application between RabbitMQ and Redis, and how to implement it depends on the actual requirements of the system.
RabbitMQ
RabbitMQ is a kind of message middleware that implements AMQP (Advanced message queuing Protocol). It originated from the financial system and is used to store and forward messages in distributed systems. It performs well in terms of ease of use, scalability and high availability. Message middleware is mainly used for decoupling between components, and the sender of the message does not need to know the existence of the message consumer, and vice versa.
Redis
Is a Key-Value NoSQL database, development and maintenance is very active, although it is a Key-Value database storage system, but it supports MQ functions, so it can be used as a lightweight queue service.
Specific differences
Reliable consumption
Redis: there is no corresponding mechanism to guarantee the consumption of messages. When consumer consumption fails, the message body is lost and needs to be handled manually.
RabbitMQ: with message consumption confirmation, even if consumer consumption fails, the message body will automatically return to the original queue, and can be persisted throughout the process to ensure that the message body is consumed correctly.
Reliable release
Reids: do not provide it, but need to implement it by yourself
RabbitMQ: has a release confirmation function to ensure that messages are published to the server
High availability
Redis: master-slave mode is adopted, read and write are separated, but there is no perfect official solution for failover.
RabbitMQ: the cluster uses disk and memory nodes. Any single point of failure will not affect the operation of the entire queue.
Persistence
Redis: persist the entire Redis instance to disk
RabbitMQ: queues and messages can all be persisted or not.
Consumer load balancing
Redis: do not provide it, but need to implement it by yourself
RabbitMQ: balanced distribution of messages according to the situation of consumers
Queue monitoring
Redis: do not provide it, but need to implement it by yourself
RabbitMQ: the background can monitor all the information of a queue (memory, disk, consumer, producer, rate, etc.)
Flow control
Redis: do not provide it, but need to implement it by yourself
RabbitMQ: when the server is overloaded, the producer rate will be limited to ensure the reliability of the service
In-and-out performance
For the entry and exit operations of RabbitMQ and Redis, each performed 1 million times, and the execution time was recorded every 100000 times.
The test data are divided into four different sizes: 128Bytes, 512Bytes, 1K and 10K.
These are all the contents of what is the difference between redis and rabbitmq. Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.