关于redis消息队列的应用场景
ringa_lee
ringa_lee 2017-04-24 15:59:44
0
7
947

听说redis的消息队列可以抗大并发,现在想要做一个查询方面功能,不知道是否适合。

ringa_lee
ringa_lee

ringa_lee

reply all(7)
某草草

Based on the content of this question, my answer is:

Suitable, very suitable...

曾经蜡笔没有小新

Message queue is mainly used for: writeoperations

under large concurrency

It is recommended to use elasticsearch

淡淡烟草味

Redis is used as a message queue: for example, send an email.
Do you think it’s better to send them one by one? Or send them all at once? Queue queue, just come one by one.
Of course, most of the time, the first type is better. The so-called 抗大并发 means that the system can still work in an orderly manner under high load. You ask if it’s suitable, I think it’s suitable if you feel comfortable using it.

我想大声告诉你

Characteristics of queue, asynchronous, non-real-time, distributed

漂亮男人

Redis can be used as a message queue, and its performance is not bad, but it may be a bit unreliable in terms of resistance to large concurrency because it does not support clusters.
There is really no connection between the query function and the queue.

Ty80

Do you want to use redis for caching?

过去多啦不再A梦

That’s it. The function we need to do now is similar to a score query, which is mainly displayed on the web page.

1. The user clicks on the score query
2. The button text shows that it is querying, and the asynchronous query using ajax starts.
3. Internal logic calls the interface for query
4. Returns json data to the client.
5. It shows that the query is successful and is jumping.
6. Display the results page.

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!