1

We want to use Redis to distribute data to remote servers.

There is one master instance in the HQ and many remote slaves in our subsidiaries connected to the master.

Our applications are running in our subsidiaries. In 99% of the time there are read-only requests made to the slave instance.

But there is also the case of modifying data. Such a request is issued against the master.

Is there a way to ensure that the changes made to the master are replicated to the slave before the next read request?

4

1 回答 1

2

我不确定是否有一种方法可以确保 100%,但您可能想检查您的 redis.conf 文件并找到以下内容:

slave-serve-stale-data yes

听起来您希望将其设置为no. 配置文件中的注释更多地解释了这个指令。

于 2011-09-25T22:29:22.233 回答