Comet 服务器和网络延迟时间

发布于 2024-12-22 13:30:22 字数 241 浏览 2 评论 0原文

对于社交网站,我们使用基于 Node.js 的 Comet 服务器作为即时通讯工具,一切都运行良好,我们只有一个问题如何解决澳大利亚和新西兰的延迟问题,我们的 RRT 在 310 毫秒到 440 毫秒之间。

一种想法是拥有本地服务器,但在这种情况下,它们必须连接到澳大利亚用户能够与英国用户通信的主服务器。这种彗星-彗星连接也会有较高的延迟,但本地用户可以快速聊天,这在大多数情况下都是如此。

有没有人比使用本地彗星服务器有更好的主意?

For a social site we use a node.js based comet server as the instant messenger, everything is working great we have only one problem how to solve the latency problem to Australia and New Zealand where we have RRT between 310 ms to 440 ms.

One idea is to have local servers, but in this case they must connect to the main server that a user in Australia is able to communicate with one from the UK. This comet-comet connection will have a higher latency too, but local users can chat fast which will be mostly the case.

Has anyone a better idea then use of a local comet servers?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

请恋爱 2024-12-29 13:30:22

如果您的延迟是由于地理距离造成的,则无法选择如何缩短它。您唯一能做的就是尝试寻找拥有更多“直”电缆的上游网络提供商。但您永远无法实现比这两个国家/服务器之间的直接空中距离更短的延迟。

如果澳大利亚的用户相互通信,那么是的,如果他们连接到本地服务器,这对他们来说将会有所不同。但对于英国的一名用户和澳大利亚的一名用户之间的通信,如果您有本地服务器,那并不重要。

但无论如何,对于即时通讯工具来说,延迟并不是那么重要,恕我直言。收件人不知道发件人完成消息并点击发送按钮的时刻,因此他无法测量延迟。而且人类无法每秒发送多条消息,因此我认为不可能看出 400 毫秒和 10 毫秒延迟之间的差异。如果超过 1 秒,它可能是可见的......

所以总而言之,只有当有足够的本地用户之间进行通信时,我才会费心制作本地服务器。

(如果我对您的设置的一些假设不正确,请告诉我。)

If your latency is due to the geographical distance, there is no option how to shorten it. The only thing you can do is try find upstream network providers who have more "straight" cables. But you can never achieve latency shorter than direct air distance between those 2 countries/servers.

If you will have users in Australia communicating with each other, then yes, it will be a difference for them if they will be connecting to a local server. But for communication between one user in UK and one in AU, it won't matter if you have a local server.

But anyway for an instant messenger the latency is not so important IMHO. The recipient does not know the moment when the sender finished his message and hit the send button, so he can't measure the latency. And human is not able to send multiple messages per second, so I think it won't be possible to see the difference between 400 ms and 10 ms latency. If it would be over 1 second, it could be visible...

So to summarize I would bother with making local servers only when there would be enough local users communicating between themselves.

(Please let me know if some of my assumptions about your setup were incorrect.)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文