pantheon-systems / wp-redis

WordPress Object Cache using Redis.
https://wordpress.org/plugins/wp-redis/
GNU General Public License v2.0
226 stars 68 forks source link

Question: Load balancing multiple wordpress instances. #267

Closed agiz closed 4 years ago

agiz commented 4 years ago

Hi.

Let's say I have a load balancer sending traffic to two WP instances (same site) each in it's own docker container. One instance can read and write to the DB and to the filesystem, while the other instance is pure slave with just read access to both DB and filesystem.

Do you recommend sharing redis server between two instances or should each instance be connected to their own redis server.

Best, Ziga

danielbachhuber commented 4 years ago

Hi @agiz,

Given the data is shared between the two instances, it'd be fine to share the same Redis server too. A DB write on the first instance should purge the shared cache value.