For large-scale PHP applications, what application is usually used for message queue?

WBOY
Release: 2016-09-24 09:04:04
Original
1686 people have browsed it

I have been using Redis as a message queue, and suddenly I thought, is there a better one?

Reply content:

We use beanstalk, qps is about 1000 If you are simply doing queue services, I recommend beanstalkd (small, good performance). If you consider high availability and massive volume, you can use kafka. Why don't you first point out the aspects of the existing solutions that are not good enough? I feel like this problem has nothing to do with PHP? Message queue selection more considers business scenarios:

* Performance, such as how many messages are there per second. If you have tens of thousands of messages per second, then Beanstalk and RabbitMQ cannot be used directly.
* Reliability, are messages allowed to be lost? Is persistence required?
* High availability, can downtime be tolerated?
* Whether distribution is needed
* Operation and maintenance costs, whether your company's development (operation and maintenance) has the ability to maintain this message queue
* Client support, this is something at the language level. For example, Kafka is a very good message queue, but its PHP client is not very well written, and it is difficult to rewrite it yourself, so you should be careful when choosing one.

After weighing these factors, you can decide how to choose.
What message queues are there: Message queue
Performance comparison: bravenewgeek.com/dissec redis,rabbitmq Use redis and rabbitmq This depends on your application scenario. Generally speaking, it is relatively simple to use redis, but redis cannot realize the situation where the message is not processed normally and other processes can still process the message, that is, there is no process of confirming the completion of processing of the message.
If you want a complete message queue, the ones I have used include: gearman and rabbitmq, both of which are good. php-resque gearman. If you require no message loss across networks, you can also choose kafka worker
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!