当前位置:网站首页>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
边栏推荐
- Create real-time video chat in unity3d
- Reading notes - learn to write: what is writing?
- Mysql to PostgreSQL real-time data synchronization practice sharing
- [Yugong series] February 2022 attack and defense world advanced question misc-84 (MySQL)
- 15. System limitations and options
- Winter vacation daily question -- a single element in an ordered array
- ZABBIX API batch delete a template of the host
- Pytoch residual network RESNET
- Feign implements dynamic URL
- Crawler practice website image batch download
猜你喜欢
Introduction to graphics: graphic painting (I)
Basic editing specifications and variables of shell script
LV1 previous life archives
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
MySQL advanced SQL statement (1)
The boss said: whoever wants to use double to define the amount of goods, just pack up and go
SQL statement
High level application of SQL statements in MySQL database (I)
Solve the problem that the tabbar navigation at the bottom of vantui does not correspond to the page (window.loading.hash)
VRRP+BFD
随机推荐
Portapack application development tutorial (XVII) nRF24L01 launch C
Applet graduation design is based on wechat course appointment registration. Applet graduation design opening report function reference
Question C: Huffman tree
Global and Chinese market of thin film deposition systems 2022-2028: Research Report on technology, participants, trends, market size and share
STM32 key content
Portable two-way radio equipment - current market situation and future development trend
String & memory function (detailed explanation)
Why is the operation unsuccessful (unresolved) uncaught syntaxerror: invalid or unexpected token (resolved)
When tidb meets Flink: tidb efficiently enters the lake "new play" | tilaker team interview
Optimization theory: definition of convex function + generalized convex function
Summarize the past to motivate yourself to move on
Valentine's Day - 9 jigsaw puzzles with deep love in wechat circle of friends
C language black Technology: Archimedes spiral! Novel, interesting, advanced~
Write the first CUDA program
Buuctf QR code
Global and Chinese market of small batteries 2022-2028: Research Report on technology, participants, trends, market size and share
Global and Chinese market of cell scrapers 2022-2028: Research Report on technology, participants, trends, market size and share
Small program graduation project based on wechat examination small program graduation project opening report function reference
Measurement fitting based on Halcon learning [4] measure_ arc. Hdev routine
Hamburg University of Technology (tuhh) | intelligent problem solving as integrated hierarchical reinforcement learning