https://redis.io/topics/cluster-tutorial
https://redis.io/commands/cluster-keyslot
config file:
cluster-enabled yes
cluster-config-file cluster.conf
cluster-node-timeout 15000
steps
- redis-server --service-install redis.windows-service.conf --service-name RedisServer6379 --loglevel verbose
- redis-cli -h 127.0.0.1 -p 6379 -a password
CLUSTER MEET 10.10.0.2 6379
CLUSTER NODES
- CLUSTER REPLICATE d47c1c1c51a3f36da2aaba37c8b22ea0b7aae39e
- for ($slot=0;$slot -le 16383;$slot++) {
.
edis-cli.exe -h 127.0.0.1 -p 6379 CLUSTER ADDSLOTS $slot
}
refer to
https://stackoverflow.com/questions/34615090/redis-on-windows-cluster-setup
https://blog.octo.com/en/what-redis-deployment-do-you-need/
https://medium.com/zero-to/setup-persistence-redis-cluster-in-kubertenes-7d5b7ffdbd98
https://gist.github.com/JonCole/9225f783a40564c9879d#running-expensive-operationsscripts
Cluseter add password:
查看Windows下端口占用情况
netstat -ano | findstr "80" (注80是你想要看查看的端口号)
协议 本地地址 外部地址 状态 PID
tasklist | findstr "5584"(注 5584是进程的id即PID)
打开Telnet功能
dism /online /Enable-Feature /FeatureName:TelnetClient
在windows防火墙,入站规则(Inbound Roles) 中添加需要的端口和加10000后的端口
Connection String
加上 ,password=abc
Commands
info keyspace
keyslot
Config
cluster-require-full-coverage <yes / no>:如果设置为yes,则默认情况下,如果任何节点未覆盖某个百分比的密钥空间,则集群将停止接受写入。 如果该选项设置为no,即使只能处理有关键子集的请求,群集仍将提供查询。