Skip to content

Commit

Permalink
新增集群锁文档
Browse files Browse the repository at this point in the history
  • Loading branch information
WhaleSong committed Nov 10, 2021
1 parent d6e3868 commit 29418f2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docs/zh/component_specs/lock/redis.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ docker pull redis:latest
docker run -itd --name redis-test -p 6380:6379 redis
```

#Redis_cluster
# Redis_cluster

#配置项说明
## 配置项说明
示例:configs/config_lock_redis_cluter.json
| 字段 | 必填 | 说明 |
| --- | --- | --- |
Expand All @@ -27,13 +27,13 @@ docker run -itd --name redis-test -p 6380:6379 redis
| concurrency | Y | redis集群锁操作中协程池并发度,用于控制并发加锁协程数,默认为cpu核数 |
其他配置与redis单点一致

#关于集群锁
## 关于集群锁
使用红锁算法实现
配置3个redis节点只能容忍1个节点异常,配置5个节点能容忍两个节点异常
配置1个节点时退化成单点锁
建议使用5个节点

#如何启动多个redis节点
## 如何启动多个redis节点
如果想启动redis集群锁的demo,需要先用Docker启动5个Redis
命令:
```shell
Expand Down

0 comments on commit 29418f2

Please sign in to comment.