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

router集群挂了,恢复策略是? #94

Closed
kirk91 opened this issue Jun 7, 2016 · 6 comments
Closed

router集群挂了,恢复策略是? #94

kirk91 opened this issue Jun 7, 2016 · 6 comments

Comments

@kirk91
Copy link
Contributor

kirk91 commented Jun 7, 2016

当前的router集群把数据都存储在了内存中,如果服务发布或者其他不可抗拒原因,router服务挂掉(或重启掉) 了,userIdsubkeyserverId的对应关系就丢失了,推送服务等于不可用了。 @Terry-Mao 看了代码没有找到router数据落地与恢复逻辑,当前的玩法是怎么样子的?

@Terry-Mao
Copy link
Owner

当时的想法是做一次全量拉取,或者是router 本身做多副本,目前我们自己线上都是单点的,后面考虑直接使用 redis,来做主从避免类似的问题,你的意见呢?

@kirk91
Copy link
Contributor Author

kirk91 commented Jun 16, 2016

直接使用redis,router逻辑会有很大的变更吧, 而且多idc的情况下router数据的同步也会是一个比较疼的问题

@tonybase
Copy link
Collaborator

tonybase commented Jun 16, 2016

微信的好像每个用户只属于一个主idc,然后cdn做加速和心跳优化。

@kirk91
Copy link
Contributor Author

kirk91 commented Jun 16, 2016

用户和主idc的对应关系是在cdn层面完成的还是client做的? 如果是在cdn层面调度的话,向客户端推送数据的时候,还是需要知道userid:idc的路由关系.

@kirk91
Copy link
Contributor Author

kirk91 commented Jun 16, 2016

当前貌似是不支持对离线用户进行推送的,有比较推荐的玩法么?

@Terry-Mao
Copy link
Owner

我们目前新做的架构是全IDC 同步路由信息,这个版本改动比较多,等稳定测试了才会上线;

离线 建议使用微信的sync 协议,就是版本号下拉这种做法

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