简体   繁体   English

中间副本崩溃时,从属(副本)的Redis复制链

[英]Redis replication chain of slaves(replicas) when intermediate replica crashes

I have this situation. 我有这种情况。 A Redis Master, with a replica(Slave) R1, for redundancy, which can be promoted to Master in case of failure, plus two extra replicas, R2 and R3, which are only for replication, and can't be promoted. 带有副本(从属)R1的Redis主服务器,用于冗余,在出现故障的情况下可以升级为主服务器,另外还有两个额外的副本R2和R3,它们仅用于复制,不能升级。

The point is, R2 and R3 are over a WAN, so in other to save bandwidth, I was thinking about making R3 a "replicaof" R2. 关键是,R2和R3在WAN上,因此为了节省带宽,我正在考虑使R3成为“副本” R2。 I know it works, but my problem is : 我知道它有效,但是我的问题是:

if R2 crashes, what happens to R3? 如果R2崩溃,R3会如何? How can it be then connected to the Master instead? 然后如何将其连接到主机? I mean automatically, like using Redis-sentinels, for instance. 我的意思是自动地,例如使用Redis前哨。 And, if that is possible, what will happen when R2 recovers? 而且,如果可能的话,R2恢复时会发生什么?

Ay ideas? 有想法吗?

Best Regards, 最好的祝福,

Luis 路易斯

if R2 crashes, what happens to R3? 如果R2崩溃,R3会如何?

R3 disconnects from R2, and CANNOT sync with the master. R3与R2断开连接,并且无法与主机同步。 Although R3 is still in slave role. 尽管R3仍然扮演奴隶角色。

How can it be then connected to the Master instead? 然后如何将其连接到主机?

AFAIK, you have to manually reconfig R3 to be a slave of the master. AFAIK,您必须手动将R3重新配置为主机的从机。

However, this is an interesting scenario, I think you can open an issue to Redis developers. 但是,这是一个有趣的场景,我认为您可以向Redis开发人员提出问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM