In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
How to analyze the use of redis and memcache comparison, in view of this problem, this article introduces the corresponding analysis and solutions in detail, hoping to help more partners who want to solve this problem to find a more simple and feasible method.
Problems encountered in using memcache
1. For some real-time data, it is directly written to memcache as a database, the memory allocation is large enough, and the slot setting has been adjusted several times, but there will always be some inexplicable machines whose evictions > 0. The memcache of this part of the program does not allow this to happen. After several searches, this situation will occasionally occur on a certain machine in the cluster.
2. Operation and maintenance adjust network settings and firewalls, or some memcache machines are old and frequent downmachines, resulting in cache redistribution, cache invalidation, a large number of requests pressed to the database, and the system response is slow, even downmachine.
3. Memcache has some problems with the support of multiple key and complex types at the same time, which makes it inefficient to access multiple key. A typical scenario is to read the number of clicks in the list.
Benefits of reids
These benefits may not necessarily apply to your project, but you should reasonably determine which tool to use according to your own project. Basically for our pain points, the advantages of redis are as follows:
1. Data persistence, redis data can be persisted to disk. Some people say that memcache has memcachedb, which I have studied, but I always feel that it is not as good as native support. For our project, redis will not be cleared out of the cache as long as there is enough memory for real-time and efficient data.
2. Redis supports master-slave mode, and each machine is equivalent to a full copy. When the master fails, it can be switched seamlessly through Sentinel mode or 3.0 cluster mode.
3. Mset, mget and other efficient operations are provided for storing multiple key-value pairs at the same time, and the test efficiency is very high. And support complex objects such as list, map and set.
Before considering redis, we also consider databases such as mongodb and Berkeley DB. Finally, we find that redis is more suitable for our high concurrent real-time data display needs.
This is the answer to the question on how to analyze the use of redis and the comparison of memcache. I hope the above content can be of some help to you. If you still have a lot of doubts to be solved, you can follow the industry information channel to learn more about it.
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.