Skip to content
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

Better handling of master failover #238

Open
laurivosandi opened this issue Aug 27, 2024 · 2 comments
Open

Better handling of master failover #238

laurivosandi opened this issue Aug 27, 2024 · 2 comments

Comments

@laurivosandi
Copy link

laurivosandi commented Aug 27, 2024

It looks like most applications do have Redis reconnect support if Redis operation results in error such as ReplyError: READONLY You can't write against a read only replica. In fact the ioredis docs specifically mention this usecase.

This is related to #149 (comment)

To better support dumb clients I would advise implementing TCP disconnect when Dragonfly pod loses master role to ensure clients reconnect to the new Dragonfly master pod

@Pothulapati
Copy link
Collaborator

Hmm, This makes sense but

To better support dumb clients I would advise implementing TCP disconnect when Dragonfly pod loses master role to ensure clients reconnect to the new Dragonfly master pod

How can we do this? Considering we don't have a proxy to do different replies. It's upto the older pod to return READONLY (which they will once they are configured as a replica). wdyt? 🤔

@laurivosandi
Copy link
Author

I think it would be fine to issue TCP connection reset for every open connection if pod loses write master status. You can make this behaviour optional via command line flag or something like that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
@laurivosandi @Pothulapati and others