Socket.IO - 是打开的连接忧虑? [英] Socket.IO - are the open connections a concern?

查看:135
本文介绍了Socket.IO - 是打开的连接忧虑?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前与 DerbyJS ,因为它促进了洁净,干燥的客户机/服务器code工作。侧收益(最主要的原因,大多数人使用的框架)是它使用Socket.IO来创建实时应用程序。在这种情况下,我没有的需求的实时性,但它是一个很好的补充。

I'm currently working with DerbyJS because it fosters clean, DRY client/server code. The side-benefit (main reason why most people use the framework) is it uses Socket.IO to create realtime apps. In this case, I don't need realtime, but it is a nice addition.

我的问题是 - 我会用Socket.IO牺牲的可扩展性/性能,以及所有它维护那些打开的连接?将利用骨干+防爆pressJS释放资源,因为没有打开的连接?

My question is - am I sacrificing scalability/performance by using Socket.IO, and all those open connections it maintains? Would using Backbone + ExpressJS free up resources since there are no open connections?

推荐答案

保持一堆打开的连接显然在服务器开销方面的一些成本,但我不会担心这样的担忧,除非你有一个明显的结垢问题。一旦你有一个明显的结垢问题,你应该有足够的收入购买更多的服务器资源。服务器是非常便宜的,你的时间是非常昂贵的。不要担心优化小东西。

Keeping a bunch of open connections obviously has some cost in terms of server overhead, but I wouldn't worry about concerns like this unless you have an obvious scaling problem. Once you have an obvious scaling problem, you should have enough income to buy more server resources. Servers are very cheap and your time is very expensive. Don't worry about optimizing the small stuff.

这篇关于Socket.IO - 是打开的连接忧虑?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆