skip to Main Content

I am new to redis, still reading doc, hope you could help me here.

I need a 2-stage database solution:

  • At local devices, there is a database cluster. It has several primaries and several replicas. To my understanding each primary or replica normally has a portion of the whole data set. This is called data sharding.
  • At cloud, there is another database replica. This cloud replica backs up the whole data set.

I like to use free redis for this solution, not enterprise version.

Is this achievable? From what I read so far, it seems that there is no problem if the cloud replica is just like local replica to back up a portion of data set. So I want to know whether I can use the cloud database to back up the whole cluster.

Thanks!

2

Answers


  1. Nothing prevents you from having a replica hosted in the cloud, but each Redis cluster node is either a master responsible of a set of key slots (shards) or a replica of a master; in a multi-master scenario there is no way to have a single replica covering different master nodes.

    With the goal of having your entire cluster data replicated in the cloud, you should configure and host there one additional Redis replica per each master node. To avoid those new replicas to ever become masters themselves, you can set their cluster-replica-no-failover configuration property accordingly in their redis.conf files:

    cluster-replica-no-failover yes

    In all cases, please note that replication is not a backup solution and you may want to pair your setup with a proper Redis persistence mechanism.

    Login or Signup to reply.
  2. If I understand your questions clearly, your master dataset(in shards) are located on premise and the replicas(slave) are hosted on cloud. There is nothing preventing you from backing up your slaves(open source redis) on the cloud. Redis doesn’t care where the slaves are situated provided the master can reach them. Master-slave replication is available on redis enterprise with no such restriction. You might have a little problem implementing master-master replication on redis open source but that is outside the scope of this question

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search