Domanda

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?

È stato utile?

Soluzione

I'm not sure if there is a way you can ensure this 100%, but you probably want to check in your redis.conf file and find this:

slave-serve-stale-data yes

Sounds like you'd want that set to no. The comments in the config file explain more about this directive.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top