当前位置:网站首页>缓存穿透、缓存击穿、缓存雪崩分别是什么
缓存穿透、缓存击穿、缓存雪崩分别是什么
2022-07-04 15:38:00 【51CTO】
缓存中存放的⼤多都是热点数据,⽬的就是防⽌请求可以直接从缓存中获取到数据,⽽不⽤访问 Mysql
。
- 缓存雪崩:如果缓存中某⼀时刻⼤批热点数据同时过期,那么就可能导致⼤量请求直接访问Mysql了,解决办法就是在过期时间上增加⼀点随机值,另外如果搭建⼀个⾼可⽤的Redis集群也是防⽌缓 存雪崩的有效⼿段
- 缓存击穿:和缓存雪崩类似,缓存雪崩是⼤批热点数据失效,⽽缓存击穿是指某⼀个热点key突然失效,也导致了⼤量请求直接访问Mysql数据库,这就是缓存击穿,解决⽅案就是考虑这个热点key不 设过期时间
- 缓存穿透:假如某⼀时刻访问redis的⼤量key都在redis中不存在(比如黑客故意伪造⼀些乱七八糟的key),那么也会给数据造成压⼒,这就是缓存穿透,解决⽅案是使⽤布隆过滤器,它的作⽤就是 如果它认为⼀个key不存在,那么这个key就肯定不存在,所以可以在缓存之前加⼀层布隆过滤器来 拦截不存在的key
边栏推荐
- Overflow: the combination of auto and Felx
- 将Opencv绘制图片显示在MFC Picture Control控件上
- 智慧物流园区供应链管理系统解决方案:数智化供应链赋能物流运输行业供应链新模式
- js中的数组筛选fliter
- Inside and outside: flow chart drawing elementary: six common mistakes
- GO开发:如何利用Go单例模式保障流媒体高并发的安全性?
- Start by counting
- 安信证券属于什么档次 开户安全吗
- Height residual method
- The Ministry of human resources and Social Security announced the new construction occupation
猜你喜欢
PingCode 性能测试之负载测试实践
Chow Tai Fook fulfills the "centenary commitment" and sincerely serves to promote green environmental protection
一加10 Pro和iPhone 13怎么选?
新的职业已经出现,怎么能够停滞不前 ,人社部公布建筑新职业
VMware Tools和open-vm-tools的安装与使用:解决虚拟机不全屏和无法传输文件的问题
Kunming Third Ring Road Closure project will pass through these places. Is there one near your home?
S2b2b solution for lighting industry: efficiently enable the industrial supply chain and improve the economic benefits of enterprises
It's too convenient. You can complete the code release and approval by nailing it!
被PMP考试“折磨”出来的考试心得,值得你一览
2022年国内云管平台厂商哪家好?为什么?
随机推荐
Redis 的内存淘汰策略和过期删除策略的区别
2022年国内云管平台厂商哪家好?为什么?
[glide] cache implementation - memory and disk cache
MVC模式和三层架构
[Acwing] 58周赛 4489. 最长子序列
从数数开始
整理混乱的头文件,我用include what you use
Height residual method
leetcode:421. 数组中两个数的最大异或值
tx.origin安全问题总结
Two methods of MD5 encryption
Configuration instance of Oracle listener server and client
Linear time sequencing
DataKit——真正的统一可观测性 Agent
NFT liquidity market security issues occur frequently - Analysis of the black incident of NFT trading platform quixotic
How to implement a delay queue?
一加10 Pro和iPhone 13怎么选?
Spark 中的 Rebalance 操作以及与Repartition操作的区别
Capvision Rongying's prospectus in Hong Kong was "invalid": it was strictly questioned by the CSRC and required supplementary disclosure
Load test practice of pingcode performance test