Different usage of a cluster (only masters)

55 views
Skip to first unread message

Daniele Aluigi

unread,
Sep 4, 2019, 8:16:14 AM9/4/19
to Redis DB
Hi all,
just a question about a different usage of a redis cluster.

Until now i always used redis cluster in the canonical way, with at least a slave node for each master.

Actually i'm valuating a different usage without slaves, just because huge dataset only composed by cache.
Basically the problem is not related to HA and persistency but to the double ram allocation needed by slave nodes.  

So, i tried a cluster composed by 4 master nodes without slaves.
In case of failure of one master node, the cluster is going in DOWN state until i manually reassigned orphan slots ( CLUSTER DELSLOT, then CLUSTER ADDSLOT).

At the moment:
  • i'm trying to use sentinel hook to automate the slot resharding process
  • looking for the fast way to re-add the faulted nodes as master (SLAVEOF NO ONE is not working in this case).
Does anyone had already faced this issue?

Thanks,
Daniele

Tuco

unread,
Sep 6, 2019, 3:57:34 AM9/6/19
to Redis DB
Hey, 

I think you can try the following.

add the below in your config file.
cluster-require-full-coverage no

Also, run a script which runs after every configurable time and does "redis-cli -h <anyhost> -p <anyport> cluster info | grep cluster_slots_ok "
Check if the above return something which is less than 16384, then send an alert etc.

This will make sure of the following.
  • Your cluster will not fail and will keep on running for most requests. If 1 master fails out of 4 masters and slots and requests are equally distributed , your 75% requests will succeed.
  • The script will alert that you something is wrong, and you may need to restart server to bring it up etc.
Tuco
Reply all
Reply to author
Forward
0 new messages