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

Introduce #reconnect method #14

Merged
merged 1 commit into from
Feb 18, 2018
Merged

Introduce #reconnect method #14

merged 1 commit into from
Feb 18, 2018

Conversation

brandur
Copy link
Collaborator

@brandur brandur commented Feb 16, 2018

Introduces a #reconnect method that allows users of the library to get
finer grain control over how it behaves. When received, #reconnect
closes every connection that it knows about and reloads it pool. This is
useful, for example, to force a reconnect when receiving certain types
of errors.

#reconnect has an optional argument use_initial_hosts that tells the
client to restart from the object's original configuration instead of
reusing whatever it's holding from the last time it requested CLUSTER SLOTS. This should be useful for some users who want to guarantee a
clean slate.

Introduces a `#reconnect` method that allows users of the library to get
finer grain control over how it behaves. When received, `#reconnect`
closes every connection that it knows about and reloads it pool. This is
useful, for example, to force a reconnect when receiving certain types
of errors.

`#reconnect` has an optional argument `use_initial_hosts` that tells the
client to restart from the object's original configuration instead of
reusing whatever it's holding from the last time it requested `CLUSTER
SLOTS`. This should be useful for some users who want to guarantee a
clean slate.
@brandur
Copy link
Collaborator Author

brandur commented Feb 16, 2018

@zhchsf I hope it's alright to keep these coming, but we seem to be on a bit of a roll :) Only three more to go after this one!

@zhchsf
Copy link
Owner

zhchsf commented Feb 18, 2018

@brandur For 80% system, single redis is enough. Most systems maybe use proxy like Codis, Twemproxy or others solutions. Also, some ruby systems maybe using their own redis cluster gem, but not open source.

@zhchsf zhchsf merged commit a941e8d into zhchsf:master Feb 18, 2018
@brandur
Copy link
Collaborator Author

brandur commented Feb 18, 2018

Thanks @zhchsf! Issued the next one at #15.

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

Successfully merging this pull request may close these issues.

2 participants