redis级联复制

3lxsmp7m  于 2021-06-09  发布在  Redis
关注(0)|答案(1)|浏览(403)

我在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读取吗?

2w2cym1i

2w2cym1i1#

可能无法配置这样的复制。看了文件,发现了这样一个项目

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.

相关问题