Skip to content

Commit

Permalink
Update archives.
Browse files Browse the repository at this point in the history
  • Loading branch information
poneding committed Sep 4, 2024
1 parent 3df9689 commit 5c955e4
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 0 deletions.
4 changes: 4 additions & 0 deletions content/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
- [堆排序](algo/堆排序.md)
- [快速排序](algo/快速排序.md)

## architechture

- [缓存设计](architechture/cache-design.md)

## AWS

- [搭建EKS集群](aws/build-eks-cluster.md)
Expand Down
5 changes: 5 additions & 0 deletions content/architechture/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[🏠 首页](../_index.md) / architechture

# architechture

[缓存设计](cache-design.md)
38 changes: 38 additions & 0 deletions content/architechture/cache-design.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
[🏠 首页](../_index.md) / [architechture](_index.md) / 缓存设计

# 缓存设计

## 缓存穿透

缓存穿透是指查询一个在缓存层不存在的数据,请求会打到存储层。

解决办法:

1. 缓存控对象;
2. 布隆过滤器;

## 缓存击穿

大批量缓存在同一时间失效,导致大量请求打到存储层造成数据存储服务压力过大。

解决办法:

为缓存设置不同的过期时间。

## 缓存雪崩

缓存层服务失效,请求全部打到存储层。

解决办法:

1. 缓存层高可用;
2. 存储层采用限流、熔断或降级等隔离组件;
3. 混沌工程,预演缓存层不可用,存储层处理能力。

## 热点缓存

热点数据,还未建立缓存或者缓存过期,同一时间巨大请求量并发打过来。

解决办法:

- 使用互斥锁,只允许一个线程建立缓存。

0 comments on commit 5c955e4

Please sign in to comment.