当前位置:网站首页>[redis] redis penetration, avalanche and breakdown
[redis] redis penetration, avalanche and breakdown
2022-07-27 20:04:00 【Boss, vegetables, bring】
through
Definition :
Penetration means that the requested data is in Redis Neither in the cache nor in the database , So the database returned an empty data ,Redis No caching , Every time the requested data is queried in the database .
resolvent :
- Redis Cache the empty data returned by the database , And set a reasonable expiration time , In this way, you can get data from the cache when requesting again .
- Set up the bloon filter (Bloom Filter), The function is to filter the requested data first , Intercept requests for nonexistent data , The existing data is released to Redis.
An avalanche
Definition :
Avalanche refers to a large number of Request data ( inequality ) Inquire about Redis when Redis Broken or data expired at the same time , Cause the request to hit the database directly, causing the database to crash .
resolvent :
- Set multi-level cache :nginx cache Redis cache .
- Set up disaster warning mechanism : Regular inspection Redis Server status, etc .
- The data expiration time is set to a fixed value + Random value , Try to spread the expiration time .
- Current limiting the drop ( Not recommended )
- Current limiting : Limit the number of requests that request the database
- Downgrade : For some hot spots, data is saved in memory , When Redis Query memory directly in case of failure
- Set the hotspot data to never expire
- Automatically / Manually check the expired data , Decide whether to postpone .
breakdown
Definition :
Breakdown refers to a large number of requests The same data , But at this time Redis This data is out of date , Cause the request to hit the database directly, causing the database to crash .
resolvent :
- Distributed lock , Only one request is allowed to query the database , Other request delay .
- For hot data settings, never expire .
- Automatically / Manually check the expired data , Decide whether to postpone .
- Data preheating , The hot data is saved to the cache in advance .
边栏推荐
- Togglebutton (button switch)
- Basic functions of pytorch tensor
- 由单片机XTALIN引脚和XTALOUT引脚导出的对晶体震荡电路的深入理解
- [Redis] Redis穿透、雪崩和击穿
- Adults have only one main job, but they have to pay a price. I was persuaded to step back by personnel, and I cried all night
- JS 数组方法 forEach 和 map 比较
- mysql学习录(三)多表查询、子查询、分页查询、case语句、单行函数
- vlan试验2021.1.14
- [论文阅读] Rich Feature Hierarchies for Accurate Object Detection and Semantic Segmentation
- Broadcastreceiver (broadcast)
猜你喜欢

JS event listening mouse keyboard form page onclick onkeydown onchange

Common errors reported by pytorch

顶级“黑客”能厉害到什么地步?无信号也能上网,专家:高端操作!

成年人只有一份主业是要付出代价的,被人事劝退后,我哭了一整晚
![In a real case, college students were cheated when taking orders. I hope you won't be cheated [painful lesson]](/img/7d/142e69d6da1899cefbcc99d7929fba.png)
In a real case, college students were cheated when taking orders. I hope you won't be cheated [painful lesson]

Introduction to basic cesium controls

Datepicker and TimePicker

Static test. 2021.01 .13

‘vite‘ 不是内部或外部命令,也不是可运行的程序 或批处理文件

vlan试验2021.1.14
随机推荐
mysql函数汇总之系统信息函数
内置模块10.18
总线Bus是什么意思
Marqueetextview (running lantern)
Summenudemo (submenu)
C # find perfect numbers, output daffodils and use of classes
libpcap库和pcap_sendpacket接口函数了解
Introduction to basic cesium controls
File operation protection
Oracle 简单的高级查询
[论文阅读] Rich Feature Hierarchies for Accurate Object Detection and Semantic Segmentation
C background GC cause and effect
Capacitance in series and in parallel and capacitance in series and balance resistance
Datepicker and TimePicker
Gestureoverlayview (gesture recognition 2)
Systemservice (system service)
[Redis] Redis几种部署方式
中国业务型CDP白皮书 | 爱分析报告
Version announcement | Apache Doris 1.1 release version officially released!
连接池-归还连接详解(上)