Writing to two Redis servers

737 Views Asked by At

I am looking for a way to send Redis writes from one particular client to two Redis servers running on different hosts.

This isn't quite replication, if writes come in from any other client I do not want those to be replicated. e.g. writes from producers go to redis1 & redis2. writes from consumer1 & consumer2 (really, deletes) should only modify redis1 & redis2, respectively

              /----> redis1 <-- consumer1
producer --->
              \----> redis2 <-- consumer2

Thanks!

1

There are 1 best solutions below

0
On

If you cannot change the code at all, then I cannot think of any solution other than writing a service that mimics Redis and sends commands to real instances.

This project can be useful: https://github.com/causes/mock_redis