File tree Expand file tree Collapse file tree 3 files changed +28
-3
lines changed Expand file tree Collapse file tree 3 files changed +28
-3
lines changed Original file line number Diff line number Diff line change 114
114
115
115
### 八、:sunny ::umbrella ::zap : Redis 核心应用
116
116
117
- - Redis(第01篇)核心:丰富的数据类型
117
+ - Redis(第01篇)核心:Redis单线程模型为啥这么快?
118
+
118
119
- Redis(第01篇)核心:读写分离与主从复制
119
120
- Redis(第01篇)核心:Sentinel 哨兵
120
- - Redis(第01篇)核心:集群
121
+ - Redis(第01篇)核心:集群与分布式
121
122
- Redis(第01篇)核心:事务
122
123
- Redis(第01篇)核心:持久化--RDB与AOF
123
124
- Redis(第01篇)核心:缓存更新
124
125
- Redis(第01篇)核心:布隆过滤
125
- - Redis(第01篇)核心:缓存击穿
126
+ - Redis(第01篇)核心:缓存击穿(缓存穿透)
126
127
- Redis(第01篇)核心:缓存雪崩
128
+ - Redis(第01篇)核心:缓存降级
127
129
- Redis(第01篇)核心:热点key
128
130
129
131
### 九、:telescope ::tokyo_tower ::satellite : 分布式系统
Original file line number Diff line number Diff line change
1
+ <h3 style =" padding-bottom :6px ; padding-left :20px ; color :#ffffff ; background-color :#E74C3C ;" >Redis丰富的数据结构</h3 >
2
+
3
+ Redis是基于 ** 内存** 的 key-value 数据库,距离操作系统更近,存取性能更好。它不仅速度快,而且提供丰富的数据结构。
4
+
Original file line number Diff line number Diff line change
1
+ <h3 style =" padding-bottom :6px ; padding-left :20px ; color :#ffffff ; background-color :#E74C3C ;" >Redis单线程模型为啥这么快?</h3 >
2
+
3
+ ** 1.基于内存操作:** Redis将所有需要存储的数据都存放在内存中,基于内存的随机访问速度是磁盘的10万倍左右,即使是SSD遥不可及。这是Redis操作快速的重要基础。
4
+
5
+
6
+
7
+ ** 2.C语言实现:** 相同逻辑下的C语言程序,执行效率要比其他语言的高很多。C语言与当前主流的操作系统之间有着独特的关系,抛开开发难度来看,执行速度还是蛮快的。
8
+
9
+
10
+
11
+ ** 3.独特的数据结构:**
12
+
13
+
14
+
15
+ ** 4.I/O多路复用模型:**
16
+
17
+
18
+
19
+ ** 5.单线程模型:** 线程不仅在启动和销毁的过程中消耗资源,而且多线程在上下文切换时也会消耗资源。大量的资源都消耗在不必要的“抢占”和“争夺”过程中,不利于高效率操作。单线程正是避免了这种情况
You can’t perform that action at this time.
0 commit comments