【问题标题】:Redis Sentinel for Windows用于 Windows 的 Redis 哨兵
【发布时间】:2013-10-19 14:11:55
【问题描述】:

我在主从设置中成功使用了 Redis for Windows (2.6.8-pre2)。但是,我需要提供一些自动故障转移功能,看来哨兵是最受欢迎的选择。当我在哨兵模式下运行 redis 时,哨兵连接,但它总是认为主服务器已关闭。此外,当我运行 sentinel master 命令时,它报告有 0 个从属设备(不是真的)并且没有其他哨兵(同样,不是真的)。所以它就像它连接到主人,但不正确。

有没有其他人在 Windows 上看到过这个问题,更重要的是,是否有人在 Windows 环境中成功使用了 sentinel?感谢任何帮助或指导!

【问题讨论】:

    标签: redis sentinel


    【解决方案1】:

    我推荐使用这个:

    • 1个主节点redis服务器1个从节点redis服务器

    • 列出第 3 项具有 quorum 为 2 的 redis sentinels

    拥有超过 3 个哨兵以获得奇数的法定人数非常重要。 我在 Windows 7 中进行了此配置,并且运行良好。

    哨兵配置示例:

    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
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-03-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多