Skip to content

Commit 463bef3

Browse files
committed
update docs
1 parent 9197969 commit 463bef3

File tree

11 files changed

+253
-434
lines changed

11 files changed

+253
-434
lines changed

README.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,16 +56,17 @@
5656

5757
> [Redis](docs/nosql/redis) 📚
5858
59+
![img](http://dunwu.test.upcdn.net/snap/20200713105627.png)
60+
5961
- [Redis 面试总结](docs/nosql/redis/redis-interview.md) 💯
60-
- [Redis 入门指南](docs/nosql/redis/redis-quickstart.md)
62+
- [Redis 入门指南](docs/nosql/redis/redis-quickstart.md) - 关键词:`内存淘汰``事件``事务``管道``发布与订阅`
6163
- [Redis 数据类型和应用](docs/nosql/redis/redis-datatype.md) - 关键词:`STRING``HASH``LIST``SET``ZSET``BitMap``HyperLogLog``Geo`
6264
- [Redis 持久化](docs/nosql/redis/redis-persistence.md) - 关键词:`RDB``AOF``SAVE``BGSAVE``appendfsync`
63-
- [Redis 复制](docs/nosql/redis/redis-replication.md) - 关键词:`SYNC``PSYNC``REPLCONF ACK`
65+
- [Redis 复制](docs/nosql/redis/redis-replication.md) - 关键词:`SLAVEOF``SYNC``PSYNC``REPLCONF ACK`
6466
- [Redis 哨兵](docs/nosql/redis/redis-sentinel.md) - 关键词:`Sentinel``PING``INFO``Raft`
65-
- [Redis 集群](docs/nosql/redis/redis-cluster.md) - 关键词:`分片``虚拟 Hash 槽`
66-
- [Redis 发布与订阅](docs/nosql/redis/redis-pub-sub.md)
67+
- [Redis 集群](docs/nosql/redis/redis-cluster.md) - 关键词:`CLUSTER MEET``Hash slot``MOVED``ASK``SLAVEOF no one``redis-trib`
6768
- [Redis 实战](docs/nosql/redis/redis-action.md) - 关键词:`缓存``分布式锁``布隆过滤器`
68-
- [Redis 运维](docs/nosql/redis/redis-ops.md) 🔨
69+
- [Redis 运维](docs/nosql/redis/redis-ops.md) 🔨 - 关键词:`安装``命令``集群``客户端`
6970

7071
#### Elasticsearch
7172

assets/redis/redis.xmind

-107 KB
Binary file not shown.

docs/.vuepress/config.js

Lines changed: 24 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -7,90 +7,43 @@ module.exports = {
77
base: "/db-tutorial/",
88
title: "DB-TUTORIAL",
99
description: "数据库教程",
10-
head: [["link", { rel: "icon", href: `/favicon.ico` }]],
10+
head: [["link", {rel: "icon", href: `/favicon.ico`}]],
1111
markdown: {
1212
externalLinks: {
13-
target: "_blank",
14-
rel: "noopener noreferrer"
13+
target: "_blank", rel: "noopener noreferrer"
1514
}
1615
},
1716
themeConfig: {
1817
logo: "images/dunwu-logo-100.png",
1918
repo: "dunwu/db-tutorial",
2019
repoLabel: "Github",
21-
docsDir: 'docs',
22-
docsBranch: 'master',
20+
docsDir: "docs",
21+
docsBranch: "master",
2322
editLinks: true,
2423
smoothScroll: true,
2524
locales: {
2625
"/": {
27-
label: "简体中文",
28-
selectText: "Languages",
29-
editLinkText: "帮助我们改善此页面!",
30-
lastUpdated: "上次更新",
31-
nav: [
32-
{
33-
text: "sql",
34-
link: "/sql/",
35-
items: [
36-
{
37-
text: "Mysql",
38-
link: "/sql/mysql/"
39-
}
40-
]
41-
},
42-
{
43-
text: "nosql",
44-
link: "/nosql/",
45-
items: [
46-
{
47-
text: "Redis",
48-
link: "/nosql/redis/"
49-
}
50-
]
51-
},
52-
{
53-
text: "🎯 博客",
54-
link: "https://github.com/dunwu/blog",
55-
target: "_blank",
56-
rel: ""
57-
}
58-
],
59-
sidebar: "auto",
60-
sidebarDepth: 2
26+
label: "简体中文", selectText: "Languages", editLinkText: "帮助我们改善此页面!", lastUpdated: "上次更新", nav: [{
27+
text: "SQL", link: "/sql/"
28+
}, {
29+
text: "NOSQL", link: "/nosql/"
30+
}, {
31+
text: "Mysql", link: "/sql/mysql/"
32+
}, {
33+
text: "Redis", link: "/nosql/redis/"
34+
}, {
35+
text: "🎯 博客", link: "https://github.com/dunwu/blog", target: "_blank", rel: ""
36+
}], sidebar: "auto", sidebarDepth: 2
6137
}
6238
}
6339
},
64-
plugins: [
65-
['@vuepress/active-header-links', {
66-
sidebarLinkSelector: '.sidebar-link',
67-
headerAnchorSelector: '.header-anchor'
68-
}],
69-
["@vuepress/back-to-top", true],
70-
[
71-
"@vuepress/pwa",
72-
{
73-
serviceWorker: true,
74-
updatePopup: true
75-
}
76-
],
77-
["@vuepress/medium-zoom", true],
78-
[
79-
"container",
80-
{
81-
type: "vue",
82-
before: '<pre class="vue-container"><code>',
83-
after: "</code></pre>"
84-
}
85-
],
86-
[
87-
"container",
88-
{
89-
type: "upgrade",
90-
before: info => `<UpgradePath title="${info}">`,
91-
after: "</UpgradePath>"
92-
}
93-
],
94-
["flowchart"]
95-
]
40+
plugins: [["@vuepress/active-header-links", {
41+
sidebarLinkSelector: ".sidebar-link", headerAnchorSelector: ".header-anchor"
42+
}], ["@vuepress/back-to-top", true], ["@vuepress/pwa", {
43+
serviceWorker: true, updatePopup: true
44+
}], ["@vuepress/medium-zoom", true], ["container", {
45+
type: "vue", before: '<pre class="vue-container"><code>', after: "</code></pre>"
46+
}], ["container", {
47+
type: "upgrade", before: info => `<UpgradePath title="${info}">`, after: "</UpgradePath>"
48+
}], ["flowchart"]]
9649
};

docs/README.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,17 @@ footer: CC-BY-SA-4.0 Licensed | Copyright © 2018-Now Dunwu
4747

4848
> [Redis](nosql/redis) 📚
4949
50+
![img](http://dunwu.test.upcdn.net/snap/20200713105627.png)
51+
5052
- [Redis 面试总结](nosql/redis/redis-interview.md) 💯
51-
- [Redis 入门指南](nosql/redis/redis-quickstart.md)
52-
- [Redis 数据类型和应用](nosql/redis/redis-datatype.md)
53-
- [Redis 持久化](nosql/redis/redis-persistence.md)
54-
- [Redis 复制](nosql/redis/redis-replication.md)
55-
- [Redis 哨兵](nosql/redis/redis-sentinel.md)
56-
- [Redis 集群](nosql/redis/redis-cluster.md)
57-
- [Redis 发布与订阅](nosql/redis/redis-pub-sub.md)
58-
- [Redis 运维](nosql/redis/redis-ops.md) 🔨
53+
- [Redis 入门指南](nosql/redis/redis-quickstart.md) - 关键词:`内存淘汰``事件``事务``管道``发布与订阅`
54+
- [Redis 数据类型和应用](nosql/redis/redis-datatype.md) - 关键词:`STRING``HASH``LIST``SET``ZSET``BitMap``HyperLogLog``Geo`
55+
- [Redis 持久化](nosql/redis/redis-persistence.md) - 关键词:`RDB``AOF``SAVE``BGSAVE``appendfsync`
56+
- [Redis 复制](nosql/redis/redis-replication.md) - 关键词:`SLAVEOF``SYNC``PSYNC``REPLCONF ACK`
57+
- [Redis 哨兵](nosql/redis/redis-sentinel.md) - 关键词:`Sentinel``PING``INFO``Raft`
58+
- [Redis 集群](nosql/redis/redis-cluster.md) - 关键词:`CLUSTER MEET``Hash slot``MOVED``ASK``SLAVEOF no one``redis-trib`
59+
- [Redis 实战](nosql/redis/redis-action.md) - 关键词:`缓存``分布式锁``布隆过滤器`
60+
- [Redis 运维](nosql/redis/redis-ops.md) 🔨 - 关键词:`安装``命令``集群``客户端`
5961

6062
#### Elasticsearch
6163

docs/nosql/redis/README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,32 +12,52 @@
1212

1313
### [Redis 入门指南 ⚡](redis-quickstart.md)
1414

15+
> 关键词:`内存淘汰``事件``事务``管道``发布与订阅`
16+
17+
![img](http://dunwu.test.upcdn.net/snap/20200713105627.png)
18+
1519
### [Redis 数据类型和应用](redis-datatype.md)
1620

21+
> 关键词:`STRING``HASH``LIST``SET``ZSET``BitMap``HyperLogLog``Geo`
22+
1723
![Redis 数据类型](http://dunwu.test.upcdn.net/snap/20200226113813.png)
1824

1925
### [Redis 持久化](redis-persistence.md)
2026

27+
> 关键词:`RDB``AOF``SAVE``BGSAVE``appendfsync`
28+
2129
![img](http://dunwu.test.upcdn.net/snap/20200224214047.png)
2230

2331
### [Redis 复制](redis-replication.md)
2432

33+
> 关键词:`SLAVEOF``SYNC``PSYNC``REPLCONF ACK`
34+
2535
![img](http://dunwu.test.upcdn.net/snap/20200712182603.png)
2636

2737
### [Redis 哨兵](redis-sentinel.md)
2838

2939
> Redis 哨兵(Sentinel)是 Redis 的高可用性(Hight Availability)解决方案。
3040
>
3141
> Redis 哨兵是 Raft 算法 的具体实现。
42+
>
43+
> 关键词:`Sentinel``PING``INFO``Raft`
3244
3345
![img](http://dunwu.test.upcdn.net/snap/20200713072747.png)
3446

3547
### [Redis 集群](redis-cluster.md)
3648

49+
> 关键词:`CLUSTER MEET``Hash slot``MOVED``ASK``SLAVEOF no one``redis-trib`
50+
3751
![img](http://dunwu.test.upcdn.net/snap/20200713100613.png)
3852

53+
### [Redis 实战](redis-action.md)
54+
55+
> 关键词:`缓存``分布式锁``布隆过滤器`
56+
3957
### [Redis 运维 🔨](redis-ops.md)
4058

59+
> 关键词:`安装``命令``集群``客户端`
60+
4161
## 📚 资料
4262

4363
- **官网**

docs/nosql/redis/redis-action.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@
44

55
- [一、应用场景](#一应用场景)
66
- [缓存](#缓存)
7-
- [布隆过滤器](#布隆过滤器)
7+
- [BitMap 和 BloomFilter](#bitmap-和-bloomfilter)
88
- [分布式锁](#分布式锁)
9+
- [二、技巧](#二技巧)
10+
- [keys 和 scan](#keys-和-scan)
911
- [参考资料](#参考资料)
1012

1113
<!-- /TOC -->

docs/nosql/redis/redis-cluster.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,18 @@
1212

1313
<!-- TOC depthFrom:2 depthTo:3 -->
1414

15-
- [一、分区](#一分区)
15+
- [一、Redis Cluster 分区](#一redis-cluster-分区)
1616
- [集群节点](#集群节点)
1717
- [分配 Hash 槽](#分配-hash-槽)
1818
- [寻址](#寻址)
1919
- [重新分片](#重新分片)
2020
- [ASK 错误](#ask-错误)
21-
- [二、故障转移](#二故障转移)
21+
- [二、Redis Cluster 故障转移](#二redis-cluster-故障转移)
2222
- [复制](#复制)
2323
- [故障检测](#故障检测)
2424
- [故障转移](#故障转移)
25-
- [三、通信](#三通信)
26-
- [四、应用](#四应用)
25+
- [三、Redis Cluster 通信](#三redis-cluster-通信)
26+
- [四、Redis Cluster 应用](#四redis-cluster-应用)
2727
- [集群限制](#集群限制)
2828
- [集群配置](#集群配置)
2929
- [五、其他方案](#五其他方案)
@@ -34,7 +34,7 @@
3434

3535
<!-- /TOC -->
3636

37-
## 一、分区
37+
## 一、Redis Cluster 分区
3838

3939
### 集群节点
4040

@@ -118,7 +118,7 @@ Redis 集群的重新分片操作由 Redis 集群管理软件 **redis-trib** 负
118118

119119
![img](http://dunwu.test.upcdn.net/cs/database/redis/redis-ask.png)
120120

121-
## 二、故障转移
121+
## 二、Redis Cluster 故障转移
122122

123123
### 复制
124124

@@ -147,7 +147,7 @@ Redis 复制机制可以参考:[Redis 复制](redis-replication.md)
147147

148148
Redis 集群选举新的主节点流程基于[共识算法:Raft](https://www.jianshu.com/p/8e4bbe7e276c)
149149

150-
## 三、通信
150+
## 三、Redis Cluster 通信
151151

152152
集群中的节点通过发送和接收消息来进行通信。
153153

@@ -159,7 +159,7 @@ Redis 集群节点发送的消息主要有以下五种:
159159
- `FAIL` - 当一个主节点 A 判断另一个主节点 B 已经进入 FAIL 状态时,节点 A 会向集群广播一条关于节点 B 的 FAIL 消息,所有收到这条消息的节点都会立即将节点 B 标记为已下线。
160160
- `PUBLISH` - 当节点收到一个 PUBLISH 命令时,节点会执行这个命令,并向集群广播一条 PUBLISH 消息,所有接受到这条消息的节点都会执行相同的 PUBLISH 命令。
161161

162-
## 四、应用
162+
## 四、Redis Cluster 应用
163163

164164
### 集群限制
165165

0 commit comments

Comments
 (0)