-
-
Notifications
You must be signed in to change notification settings - Fork 227
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is is possible to Create a Redis Cluster with 2 Replicas #185
Comments
I don't think this is possible within the current structure, do you have any thoughts on an API in terms of how your resource would look? Something that comes to mind for myself was something like: apiVersion: redis.redis.opstreelabs.in/v1beta1
kind: RedisCluster
metadata:
name: redis-cluster
spec:
redisLeader:
size: 1
redisFollower:
replicationFactor: 2 Resulting in 1 Leader and 2 Followers, Increasing Leaders to 3 (for N+1) would result in 6 Leaders, where Leader%Follower would be used to determine the Leader in which the Follower would replicate from? |
I think just specifying the number of followers replicationFactor would be enough and keep using clusterSize to deploy the desired amount of leaders. Maybe something like this: apiVersion: redis.redis.opstreelabs.in/v1beta1
kind: RedisCluster
metadata:
name: redis-cluster
spec:
clusterSize: 3 # Desired amount of leaders
redisFollower:
replicationFactor: 2 # Followers per leader Could this be posible ? Thanks |
I did initially think of something very similar and could work. Something I did see as a possible issue was that right now there's a 1:1 on leader/follower, adding a factoring, there would have to be some kind of calculation to work out follower to leader. Happy to look into this though, I've just not had much time to think about it in depth since initial response. |
This looks good. I'm going to request that you can go single leader and multiple replicas so you can have just HA and not the additional sharding that comes with adding multiple leaders. |
Look for Redis Sentinel if you need Redis HA solution without sharding.
|
Hi |
Hello,
I was trying to use the operator to have 2 followers per leader, i.e. a replication factor of 2, but couldn't find a way to achieve this. Is this possible with the operator?
many thanks,
Chris
The text was updated successfully, but these errors were encountered: