In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article will explain in detail how to use Redis in Bump. The content of the article is of high quality, so the editor shares it for you as a reference. I hope you will have a certain understanding of the relevant knowledge after reading this article.
How to use the Redis of Bump
1. Using Redis as a message queue
Of course, the List data structure of Redis is adopted, but in fact, NoSQLFan has previously discussed the method of using sortedsets structure to make weighted message queues.
two。 Using Redis as a log collector
It is actually a queue, where multiple endpoints write log information to Redis, and then a worker writes all logs to disk.
3. Store social relationships
For example, each person's friends are stored in a set, so the operation of finding two people's common friends may only need to use the intersection command.
How to use the Redis of Bump
4. Used as a cache layer
The cache used for persistent storage, like Memcached, can cache data in Redis after the persistent storage is successfully obtained. We know that the performance of Redis is better than that of Memcached.
5. About persistence
When used for persistent storage, you can choose the method of turning flush into rdb or enabling aof logs on a regular basis, depending on the reliability of the data acceptable to the business.
6. Problems with using with MongoDB
A reminder that in the early days of Bump, Redis and MongoDB were put on the same machine, but because of the single thread of Redis, a process (such as malloc or writing aof) was executed too long due to the occupation of CPU or disk IO by MongoDB, which further caused all its operations to be blocked and delayed, so try not to use it for situations that may be heavily occupied by CPU or disk IO, resulting in Redis worker threads being blocked.
On how to use Redis in Bump to share here, I hope the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.
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.