当前位置:网站首页>[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 .
边栏推荐
- C#网络应用编程,实验2:IP地址转换和域名解析练习
- PKI/TLS 工具之CFSSL —— 筑梦之路
- pytorch lstm+attention
- 【OpenBMC 系列】4.启动流程 使用qume模拟ast2600-evb
- vlan试验2021.1.14
- 化工巨头巴斯夫&Pasqal:利用量子神经网络优化天气预报
- How powerful can top "hackers" be? Internet access without signal, expert: high-end operation!
- New library online | cnopendata detailed address data of all patents in China
- 函数优先顺序
- ECU的软硬件架构
猜你喜欢
随机推荐
NAT 11.16
11.2DHCP
连接池-归还连接详解(上)
内置模块10.18
Rodin 安装 SMT Solvers 插件
信道容量、信道带宽基本概念的理解
Arrayadapter (array adapter) and simpleadapter (simple adapter)
中国业务型CDP白皮书 | 爱分析报告
华为全联接大会2022开启曼谷之旅;Facebook推视频收入分成功能,创作者可获20%分成…
Gesturedetector (gesture recognition)
函数优先顺序
PMP每日一练 | 考试不迷路-7.27(包含敏捷+多选)
Broadcastreceiver (broadcast)
化工巨头巴斯夫&Pasqal:利用量子神经网络优化天气预报
VLAN test 2021.1.14
C # network application programming, experiment 1: WPF exercise
C243:考试排名
Introduction to socke programming
Oracle +JDBC
mysql数据库中的数据如何加密呢?mysql8.0自带新特性









