Read-only active replicas

Hi everyone,

I want to use a single master with multiple read-only replicas. I notice that active-replication includes some fail-over mechanism so that running sentinel is not necessary. But is this only true in a multi-master scenario?

I would be setting the following configs:

“active-replica yes”
“replica-read-only yes”
“multi-master no”

Will these play nicely together?

I just tried this, replication is working but fail-over doesn’t occur when I kill the master.

When you say failover, did you mean

  1. A read-only replica is automatically promoted to a master when the master goes down.
  2. When a master goes down, incoming read/writes operations are sent to another node? If this is your goal, you will need a load balancer such as HA proxy.

I believe what you’re doing is you’re trying to run a single master with multiple attached read-only replicas. When the single master goes down, you want one of the attached read-only replicas to be promoted to the new single master when the original old master goes down. If that’s the case, I don’t believe active-replication / multi-master needs to be set.

Yes, I want a read-only replica to be promoted to master. I think the problem is that KeyDB’s active replication has fail-over mechanisms, so sentinel doesn’t need to be deployed. However this only works in mult-master mode and the docs aren’t entirely explicit about this.

It would be a nice feature for KeyDB to handle fail-over in this scenario also. I ended up deploying Sentinel so my problem is solved. Thanks!

Hi Ross, I tried with this configuration
–active-replica yes \
–replica-read-only yes \
–multi-master no
for key DB setup, unfortunately, replication and sync do not seem to work on our cluster. Any other configurations you have done to make it work. Don’t see much of documentation available on keydb website