Windows下的Redis Sentinel

4
我已经成功地在主从设置中使用Redis for Windows(2.6.8-pre2)。然而,我需要提供一些自动故障转移的能力,看起来sentinel是最受欢迎的选择。当我以sentinel模式运行redis时,sentinel会连接,但它总是认为主服务器已经宕机了。此外,当我运行sentinel master命令时,它报告没有从服务器(不正确),也没有其他sentinel(同样不正确)。因此,它似乎连接到了主服务器,但是不正确。
有没有其他人在Windows上遇到过这个问题?更重要的是,有没有人在Windows环境下成功地使用sentinel?任何帮助或指导都将不胜感激!
1个回答

0
我建议使用以下配置:
  • 1个主节点Redis服务器和1个从节点Redis服务器

  • 3个Redis Sentinel节点,配额为2

拥有3个Sentinel节点,以获得奇数配额,非常重要。 我在Windows 7上进行了此配置,并且工作良好。

Sentinel配置示例:

port 20001
logfile "sentinel1.log"

sentinel monitor shard1 127.0.0.1 16379 2
sentinel down-after-milliseconds shard1 5000
sentinel failover-timeout shard1 30000

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接