Redis级联复制

问题描述 投票:1回答:1

我在redis上进行级联复制

A -> B -> C

当我在A上插入数据时,我可以在B和C上获取它如果我将数据插入到B中,则无法在较低的从属C上接收它。

文档包含以下内容:

Replicas are able to accept connections from other replicas.
Aside from connecting a number of replicas to the same master,
replicas can also be connected to other replicas in a cascading-like
structure. Since Redis 4.0, all the sub-replicas will receive
exactly the same replication stream from the master.

我可以配置复制以写A / B并从C读取吗?

database redis replication
1个回答
1
投票

可能将无法配置这种复制。阅读documentation,发现这样的项目

Also note that since Redis 4.0 replica writes are only local, and are not propagated to sub-replicas attached to the instance. Sub-replicas instead will always receive the replication stream identical to the one sent by the top-level master to the intermediate replicas. So for example in the following setup:

A ---> B ---> C

Even if B is writable, C will not see B writes and will instead have identical dataset as the master instance A.
© www.soinside.com 2019 - 2024. All rights reserved.