Rabbitmq and gearman both work as message queues. What are the differences between the two, or what are the differences between advantages and disadvantages? Rabbitmq and gearman both work as message queues. What are the differences between the two, or what are the differences between advantages and disadvantages? Reply: Gearman is a distributed task distribution system, focusing on jobs.
RabbitMQ is a distributed message Queue that focuses on message/data.
Gearman needs to implement Message priority, order, filter, persistence... all of them are troublesome (or not straightforward enough), and these are typical MQ systems to consider. As replied from the upstairs, Gearman focuses on task distribution and scheduling. In the basic working mode, the Client (multiple) registers some functions with the Server, of course, after the Server receives the task, it distributes it to these functions.
RabbitMQ is the implementation of many message models, such as simple producer consumers, publishing and subscription, broadcast, and even RPC simulation. With the features of Gearman, a simple producer and consumer model can be implemented, I just want to change the idea a little bit. I need to consume messages for implementation. For more information, see RabbitMQ-RabbitMQ tutorial-Work queues.
It is recommended that you take a look at the official RabbitMQ example tutorial RabbitMQ-Getting started with RabbitMQ
It contains instances of several models, which can be easily combined with actual scenarios.
As for the advantages and disadvantages, the benevolent sees benevolence.
About three years ago, I optimized the Gearman-to-RabbitMQ solution for a well-known company in a certain industry. During the peak hours, the message volume was more than 10 million. Before the optimization, the Gearman Server had a heavy load, the Client (Worker) will also often fail, and many messages will be lost. Later, the Server will be migrated to RabbitMQ, and there will be only one Server (backup of one Server is never used ), the Client uses ACK to confirm that the message is successfully consumed, and then there will be no more... The story is not described here.
We recommend that you use RabbitMQ not only as a message model, but also to improve the system architecture design.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.