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

lazy server connect; setremotes command #2

Merged
merged 1 commit into from
Jul 3, 2015

Conversation

zheplusplus
Copy link
Contributor

此版本更新延迟连接特性, 以及 setremotes 命令.

在 redis 集群没有启动或者集群挂掉的情况下, 向 cerberus 发送指令不再会导致 cerberus 退出, 而是返回一条 -CLUSTERDOWN 错误. 集群恢复后, 一般来说 cerberus 会自动重新连接 redis. 如果 redis 的地址全部改变了, 可以使用 setremotes 命令强制 cerberus 去连接指定的节点来重新工作.

例如, cerberus 启动后再启动 3 个 redis 的集群, 3 个 redis 的地址分别是

127.0.0.1:7000
127.0.0.1:7001
127.0.0.1:7002

那么使用 redis-cli 连接到 cerberus, 然后执行

setremotes 127.0.0.1 7000

即可.

zheplusplus added a commit that referenced this pull request Jul 3, 2015
lazy server connect; setremotes command
@zheplusplus zheplusplus merged commit 5675fe1 into projecteru:master Jul 3, 2015
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.

1 participant