configuration - Redis 复制配置

标签 configuration redis replication redis-sentinel

我有一个 redis master 设置,有 2 个 slave 和一个 sentinal。

如果 master 宕机 2 秒 (+sdown) 并重新启动 (-sdown),它会读取最后一个快照,并且 slave 会与 master 重新同步。

这个问题是在最后一次保存和+sdown 之间可能有很多写入。似乎如果主机从 +sdown 变为 -sdown 而从不 +odown (启动故障转移),它应该能够从从机同步。我的理由是复制流是连续的,当 +sdown 发生时,从服务器很可能更准确地反射(reflect)主服务器的状态。

是否有一些我可以执行此操作的配置?我是否被迫依赖 AOF 或快照?

(编辑:添加哨兵标签)

最佳答案

你不能做部分故障转移,要么你做要么不做,就把从属提升为主。

来自 Redis Sentinel :

Automatic failover. If a master is not working as expected, Sentinel can start a failover process where a slave is promoted to master, the other additional slaves are reconfigured to use the new master, and the applications using the Redis server informed about the new address to use when connecting.

关于configuration - Redis 复制配置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22208798/

相关文章:

ios - 具有 MDM 负载的配置描述文件未安装到设备

windows - Solr:在 Windows 中更改数据目录

redis - 设置 Redis 以进行重复识别

redis - 通过cli获取redis hash数据

azure - 使用 RDM 使用 SSL 通过 Ngnix 安全连接到 Redis 容器

MongoDb仲裁器可以与多个replicaSets一起使用吗?

visual-studio-code - 如何在 VS Code 中创建 "terminal configuration macro"?轻松打开和拆分多个终端

linux - perl 中的文件处理(.conf 文件)

java - 复制独立 HBase 0.2 部署

c# - 我在 SQL Server 复制项目中收到 "An attempt was made to load a program with an incorrect format"错误