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

任意room的一个消息是不是要被广播到所有的comet? #366

Open
genepeng opened this issue Apr 1, 2021 · 3 comments
Open

任意room的一个消息是不是要被广播到所有的comet? #366

genepeng opened this issue Apr 1, 2021 · 3 comments

Comments

@genepeng
Copy link

genepeng commented Apr 1, 2021

想问一下, 任意room的一个消息是不是要被广播到所有comet?

如果是的话, 假如有10000个comet, 但一个room的人只连在少数几个comet上, 那广播到其它comet上是不是有些资源浪费?

@tonybase
Copy link
Collaborator

tonybase commented Apr 7, 2021

这种属于广播设计,比如百万级房间在线是很容易承载的

如果要处理这个问题,也可以在job定时拉一份rooms回来过虑的,其实广播一份如果量不大也不会有太大问题

@hirampeng
Copy link
Contributor

是的,但并不会存在很大问题,一个集群中同一room的人正常的会被分到很多comet的

@sugtex
Copy link

sugtex commented Jan 10, 2024

没记错的话,遍历所有节点是需要的,不过做了定时定量房间广播的操作,用来减少网络io操作,代价就是消息推送可能存在延迟,还不清楚这个延迟是否可配置

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

4 participants