当前位置:网站首页>缓存穿透、缓存击穿、缓存雪崩分别是什么
缓存穿透、缓存击穿、缓存雪崩分别是什么
2022-07-04 15:38:00 【51CTO】
缓存中存放的⼤多都是热点数据,⽬的就是防⽌请求可以直接从缓存中获取到数据,⽽不⽤访问 Mysql
。
- 缓存雪崩:如果缓存中某⼀时刻⼤批热点数据同时过期,那么就可能导致⼤量请求直接访问Mysql了,解决办法就是在过期时间上增加⼀点随机值,另外如果搭建⼀个⾼可⽤的Redis集群也是防⽌缓 存雪崩的有效⼿段
- 缓存击穿:和缓存雪崩类似,缓存雪崩是⼤批热点数据失效,⽽缓存击穿是指某⼀个热点key突然失效,也导致了⼤量请求直接访问Mysql数据库,这就是缓存击穿,解决⽅案就是考虑这个热点key不 设过期时间
- 缓存穿透:假如某⼀时刻访问redis的⼤量key都在redis中不存在(比如黑客故意伪造⼀些乱七八糟的key),那么也会给数据造成压⼒,这就是缓存穿透,解决⽅案是使⽤布隆过滤器,它的作⽤就是 如果它认为⼀个key不存在,那么这个key就肯定不存在,所以可以在缓存之前加⼀层布隆过滤器来 拦截不存在的key
边栏推荐
- 【测试开发】软件测试——基础篇
- Unity interview questions (continuously updated)
- 同构图与异构图CYPHER-TASK设计与TASK锁机制
- "Cannot initialize Photoshop because the temporary storage disk is full" graphic solution
- 世界环境日 | 周大福用心服务推动减碳环保
- 安信证券网上开户安全吗 开户收费吗
- 聊聊异步编程的 7 种实现方式
- Redis 的内存淘汰策略和过期删除策略的区别
- Detailed process of DC-2 range construction and penetration practice (DC range Series)
- Difference between redis' memory obsolescence strategy and expiration deletion strategy
猜你喜欢
Learn more about the basic situation of 2022pmp examination
Redis 的内存淘汰策略和过期删除策略的区别
一文掌握数仓中auto analyze的使用
Yanwen logistics plans to be listed on Shenzhen Stock Exchange: it is mainly engaged in international express business, and its gross profit margin is far lower than the industry level
太方便了,钉钉上就可完成代码发布审批啦!
PingCode 性能测试之负载测试实践
"Cannot initialize Photoshop because the temporary storage disk is full" graphic solution
The test experience "tortured" by the PMP test is worth your review
Understand ThreadLocal in one picture
Why do you say that the maximum single table of MySQL database is 20million? Based on what?
随机推荐
MD5加密的两种方式
Two methods of MD5 encryption
Hash table
安信证券属于什么档次 开户安全吗
Is it safe for Anxin securities to open an account online? Is the account opening fee charged
Go language loop statement (under Lesson 10)
egg. JS learning notes
It's too convenient. You can complete the code release and approval by nailing it!
tx.origin安全问题总结
关于nacos启动时防火墙开启8848的坑
Inside and outside: flow chart drawing elementary: six common mistakes
Years of training, towards Kata 3.0! Enter the safe container experience out of the box | dragon lizard Technology
PingCode 性能测试之负载测试实践
tp配置多数据库
Li Kou today's question -1200 Minimum absolute difference
How to contribute to the source code of ongdb core project
Task state rollback and data blocking tasks based on check point mechanism
Analysis of abnormal frequency of minor GC in container environment
网页游戏引擎
What grade does Anxin securities belong to? Is it safe to open an account