当前位置:网站首页>Problems and solutions of several concurrent scenarios of redis
Problems and solutions of several concurrent scenarios of redis
2022-07-04 02:21:00 【Drgom】
brief introduction
redis As an intermediate cache between application and database , When users access the data source, they will first access redis, If there is no data in the query, directly query the database , When you find out , The returned data will be loaded into redis Inside . In use ,redis In the concurrent scenario , Cache penetration exists , Cache breakdown and cache avalanche .
Cache penetration
problem
When accessing key When it doesn't exist , The request will always be on the database , Increased database pressure .
Solutions
One You can cache null values first key
Two Filter abnormal requests
Cache breakdown
problem
When key After expired , A large number of requests are directly pressed on the database , May cause the database to crash
Solutions
One Preload popular key
Two To extend properly key Time for
3、 ... and Set lock ( Low efficiency )
Cache avalanche
problem
The cache key A lot of overdue , It may cause the data cache update to fail
Solutions
One take key The time of failure is scattered
Two Use locks or queues
3、 ... and Regularly update key
边栏推荐
- It's corrected. There's one missing < /script >, why doesn't the following template come out?
- Iclr2022 | ontoprotein: protein pre training integrated with gene ontology knowledge
- STM32 key content
- Global and Chinese market of cell scrapers 2022-2028: Research Report on technology, participants, trends, market size and share
- 14. Process time
- Gee import SHP data - crop image
- C language black Technology: Archimedes spiral! Novel, interesting, advanced~
- The difference between lambda expressions and anonymous inner classes
- Servlet simple verification code generation
- [typora installation package] old typera installation package, free version
猜你喜欢
Final consistency of MESI cache in CPU -- why does CPU need cache
Magical usage of edge browser (highly recommended by program ape and student party)
Bugku Zhi, you have to stop him
Advanced learning of MySQL -- Application -- index
Network byte order
Small program graduation project based on wechat examination small program graduation project opening report function reference
Remember another interview trip to Ali, which ends on three sides
Applet graduation project is based on wechat classroom laboratory reservation applet graduation project opening report function reference
JVM performance tuning and practical basic theory - medium
Override and virtual of classes in C #
随机推荐
Yyds dry goods inventory override and virtual of classes in C
MySQL utilise la vue pour signaler les erreurs, Explicit / show ne peut pas être publié; Verrouillage des fichiers privés pour la table sous - jacente
Advanced learning of MySQL -- Application -- storage engine
C # learning notes: structure of CS documents
Basic editing specifications and variables of shell script
Take you to master the formatter of visual studio code
What is the intelligent monitoring system of sewage lifting pump station and does it play a big role
Ceramic metal crowns - current market situation and future development trend
Node write API
Learn these super practical Google browser skills, girls casually flirt
Solve the problem that the tabbar navigation at the bottom of vantui does not correspond to the page (window.loading.hash)
Sword finger offer 14- I. cut rope
Jerry's synchronous weather information to equipment [chapter]
How to view the computing power of GPU?
From the 18th line to the first line, the new story of the network security industry
C learning notes: C foundation - Language & characteristics interpretation
Override and virtual of classes in C #
Example 072 calculation of salary it is known that the base salary of an employee of a company is 500 yuan. The amount of software sold by the employee and the Commission method are as follows: Sales
Jerry's watch information type table [chapter]
FRP intranet penetration