- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 242
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
Promote a slave to master when the master goes down in replication mode #775
Comments
Its a good feature addition on OT Redis. shall we implement this feature? When there is a problem on master redis. We need to promote slave as Master. This will really help in all of our use case. |
HI @drivebyer , I think it could be a valuable addition to the project. |
@C-Ravina Thank you for your feedback. If I understand your question correctly, I believe the feature you're referring to is already supported in this operator; it's the replication combined with sentinel mode. A sentinel cluster monitors the replication cluster and, in the event that the master goes down, the sentinel will promote a replica to master, thus ensuring read/write operations continuity. |
Hi @drivebyer , |
Providing high availability in replication mode initially would be more user-friendly.
I'm not sure which client you are using. When one uses go-redis, a sentinel client can be created with NewFailoverClient. This client issues the SENTINEL GET-MASTER-ADDR-BY-NAME command to retrieve the master's address, enabling it to execute set/get commands to the master. |
Hi @drivebyer ,
So, can we incorporate the change to enhance replication mode by enabling automatic promotion of a slave to master when the current master fails? |
@RavinaChidambaram Redis Sentinel was specifically designed to handle high availability and automatic failover for Redis deployments. By implementing this functionality ourselves within the operator, we would be duplicating existing, well-tested logic that's already part of the Redis ecosystem. |
In replication mode, when master goes down write operations couldn't be performed as slaves are read-only. So, when a slave is promoted to master in case of master failure then write operations won't be restricted. So, it would be nice, if code changes are made to promote a slave to master in case master goes down.
The text was updated successfully, but these errors were encountered: