当前位置:网站首页>缓存穿透、缓存击穿、缓存雪崩分别是什么
缓存穿透、缓存击穿、缓存雪崩分别是什么
2022-07-04 15:38:00 【51CTO】
缓存中存放的⼤多都是热点数据,⽬的就是防⽌请求可以直接从缓存中获取到数据,⽽不⽤访问 Mysql
。
- 缓存雪崩:如果缓存中某⼀时刻⼤批热点数据同时过期,那么就可能导致⼤量请求直接访问Mysql了,解决办法就是在过期时间上增加⼀点随机值,另外如果搭建⼀个⾼可⽤的Redis集群也是防⽌缓 存雪崩的有效⼿段
- 缓存击穿:和缓存雪崩类似,缓存雪崩是⼤批热点数据失效,⽽缓存击穿是指某⼀个热点key突然失效,也导致了⼤量请求直接访问Mysql数据库,这就是缓存击穿,解决⽅案就是考虑这个热点key不 设过期时间
- 缓存穿透:假如某⼀时刻访问redis的⼤量key都在redis中不存在(比如黑客故意伪造⼀些乱七八糟的key),那么也会给数据造成压⼒,这就是缓存穿透,解决⽅案是使⽤布隆过滤器,它的作⽤就是 如果它认为⼀个key不存在,那么这个key就肯定不存在,所以可以在缓存之前加⼀层布隆过滤器来 拦截不存在的key
边栏推荐
- Go development: how to use go singleton mode to ensure the security of high concurrency of streaming media?
- La 18e Conférence internationale de l'IET sur le transport d'électricité en courant alternatif et en courant continu (acdc2022) s'est tenue avec succès en ligne.
- C implementation defines a set of intermediate SQL statements that can be executed across libraries
- Kunming Third Ring Road Closure project will pass through these places. Is there one near your home?
- 安信证券属于什么档次 开户安全吗
- [glide] cache implementation - memory and disk cache
- Start by counting
- 整理混乱的头文件,我用include what you use
- 第十八届IET交直流输电国际会议(ACDC2022)于线上成功举办
- Understand ThreadLocal in one picture
猜你喜欢
Redis 的内存淘汰策略和过期删除策略的区别
leetcode:421. 数组中两个数的最大异或值
Congratulations to Mr. Zhang Pengfei, chief data scientist of artefact, for winning the campaign Asia tech MVP 2022
Analysis of abnormal frequency of minor GC in container environment
7 RSA密码体制
"Cannot initialize Photoshop because the temporary storage disk is full" graphic solution
CANN算子:利用迭代器高效实现Tensor数据切割分块处理
Load test practice of pingcode performance test
How to implement a delay queue?
Capvision Rongying's prospectus in Hong Kong was "invalid": it was strictly questioned by the CSRC and required supplementary disclosure
随机推荐
The Ministry of human resources and Social Security announced the new construction occupation
SQL implements split
周大福践行「百周年承诺」,真诚服务推动绿色环保
被PMP考试“折磨”出来的考试心得,值得你一览
【模板】【luogu P4630】Duathlon 铁人两项(圆方树)
FIREBIRD使用经验总结
C# 实现 FFT 正反变换 和 频域滤波
关于nacos启动时防火墙开启8848的坑
Linear time sequencing
整理混乱的头文件,我用include what you use
Maximum subarray and matrix multiplication
Rebalance operation in spark and its difference from repartition operation
S2b2b solution for lighting industry: efficiently enable the industrial supply chain and improve the economic benefits of enterprises
基于check-point机制的任务状态回滚和数据分块任务
Transformer中position encoding实践
一加10 Pro和iPhone 13怎么选?
世界环境日 | 周大福用心服务推动减碳环保
Can you really use MySQL explain?
Two methods of MD5 encryption
Pytorch deep learning quick start tutorial