redismulti-master-replication

synch data in Redis multi masters configuration


I'm a newbie to Redis and I was wondering if someone could help me to understand if it can be the right tool. This is my scenario:

I have many different nodes, everyone behaving like a master and accepting clients connections to read and write a few geographical data data and the timestamp of the incoming record. Each master node could be hosted onto a drone that only randomly get in touch and can comunicate with others, accordind to network conditions; when this happens they should synchronize their data according to their age (only the ones more recent than a specified time).

Is there any way to achieve this by Redis or do I have to implement this feature at application level? I tried master/slaves configuration without success and I was wondering if Redis Cluster can somewhat meet my neeeds.

I googled around, but what I found had not an answer good for me

https://serverfault.com/questions/717406/redis-multi-master-replication

Using Redis Replication on different machines (multi master)


Solution

  • Teo, as a matter of fact, redis don't have a multi master replication.

    And the cluster shard it's data through different instances. Say you have only two redis instances. Instance1 will accept store and retrieve instance1 and instance2 data. But he will ask for, and store in, instance2 every key that does not belong to his shard.

    This is not, I think, really what you want. You could give a try to PostgreSQL+BDR as PostgreSQL supports nosql store and BDR provides a real master master replication (https://wiki.postgresql.org/wiki/BDR_Project) if that's really what you need.

    I work with both today (and also MongoDB). Each one with a different goal. Redis would provide a smaller overhead and memory use, fast connection and fast replication. But it won't provide multi master (if you really need it).