-
Notifications
You must be signed in to change notification settings - Fork 701
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
优先选择从节点执行任务 #724
Labels
type: feature request
New feature or request
Comments
感觉配置文件直接写从节点就可以,RedisShake 不做决策,可以尽量保持简单。 |
目前的实现中,即使配置文件中指定了从节点,
|
明白了,Cluster 模式下确实有这样的问题。 |
这里的设计我有点纠结,我自己测试下来后,我倾向于 scan 可以连接到从节点,sync 还是链接到主节点比较好? |
@Zheaoli sync 也是会增加主节点负载的。Redis 是单线程架构,处理用户命令和给 salve 节点发送数据交替进行。 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
当前scan_reader和sync_reader都是选择主节点进行连接,
为了避免主节点负载太高,在有从节点的情况下,优先选择从节点进行同步和迁移工作
perfer_replica
属性,表示优先选择从节点GetRedisClusterNodes()
函数,根据配置选择主从节点,若某个主节点没有从节点,则还是连接主节点The text was updated successfully, but these errors were encountered: