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)06/01 Report--
This article shows you what problems Redis may have in the case of high concurrency, the content is concise and easy to understand, and can definitely brighten your eyes. I hope you can get something through the detailed introduction of this article.
1. Cache traversal:
When the user request parameter is param=zsan, the modified data null does not exist in the database, and the default null is not saved to Redis. In this case, a large number of malicious requests do not exist data, resulting in requests directly hitting the mysql database.
Solution:
When the param=zsan query is null, a copy is directly stored in redis, but this can only ensure that this data will not hit mysql next time. If malicious users randomly generate different parameters, they can still call mysql directly.
2. Cache avalanche:
Avalanche problems may occur when some caches in the cache expire almost at the same time in the same short period of time.
Solution:
1. Plan the expiration time of all caches in the system in advance
two。 Set the timeout time and add random numbers to avoid a large number of key failures at the same time
3. Hotspot caching
A user accesses the param=sex message when the key cache expires (is about to be saved from the database query to Redis). Suddenly, a large number of users request this key, resulting in data that has not yet been cached to the Redis and is requested to the mysql [hotspot cache may be triggered as long as the setting period is set)
Solution:
Double detection lock mechanism
The above is what problems Redis may have in the case of high concurrency. Have you learned any knowledge or skills? If you want to learn more skills or enrich your knowledge reserve, you are welcome to follow the industry information channel.
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.