今天是2011年9月17日。 截至今天,Node.js 不稳定的最大原因是什么,或者不准备作为面向公众的服务器使用。
我提出的一些事情是:
如果发生未处理的异常,应用程序将关闭 图书馆还很年轻,变化很大现在我计划使用Node.js,Mongoose,Express创建一个电子商务网站,并且永远 - 我需要一些坚实的理由来考虑,以便随时做好准备。 我也想看看入侵是多么容易,但我并不太在意这一点,因为如果我遵循标准的做法,比如消毒输入,看起来很不可能。
为什么node.js不稳定?
Today is 9/17/2011. As of today, what are the biggest reasons why Node.js is unstable, or not ready to use for everyone as a public facing server by itself.
A few things that I've come up with are:
Apps will shut down if unhandled exceptions occur Libraries are still young and change a lotRight now I plan on creating an e-commerce site using Node.js, Mongoose, Express, and forever -- and I need some solid reasons to consider so that I can be prepared for whatever comes along. I'd also like to look into how easy it would be to hack, but I'm not too concerned about that yet because it seems like it's quite improbable if I follow standard practices like sanitizing inputs.
Why is node.js unstable?
最满意答案
有几个
node.js在Windows上无法稳定工作 node.js根本就不像nginx那样经过测试和测试。 核心API尚未冻结(虽然不太可能改变)。你提到的原因是falicies。
如果发生未处理的异常,应用程序将关闭
当然是的。 未处理的异常(记住异常是例外)会导致崩溃并烧毁服务器。 这就是为什么在生产中我们有强烈的防范措施。 我们使用节点群集来重新启动应用程序的任何实例(如果发生崩溃)。
图书馆还很年轻,变化很大
不是真的。 大部分稳定的图书馆确实很稳定。 有许多图书馆仔细地警告你,他们正处于开发/不稳定/不能生产的状态。 唯一的区别是,在开源社区中,您可能会遇到更多未准备好的库。 在封闭源代码社区中,只有当它们准备好时才会看到图书馆。
老实说,尽管0.4.x在Linux上是稳定的,我会用它。 我仍然可能使用node.js作为其他节点前面的负载平衡器,而不是使用nginx,但这可能被认为是有风险的。
There are a few
node.js does not work stably on windows node.js is simply not as tried and tested as say, nginx. the core API hasn't frozen yet (although it's unlikely to change).The reasons you mentioned are falicies.
Apps will shut down if unhandled exceptions occur
Yes of course they do. Unhandled exceptions (remember that exceptions are exceptional) crash and burn the server. This is why in production we have strong guards against this. We use clusters of nodes that restart any instances of your application if one crashes.
Libraries are still young and change a lot
Not really. Most of the libraries out there that are stable are indeed stable. There are plenty of libraries which carefully warn you that they are in development / unstable / not production-ready. The only difference is that in the open source community you get exposed to a lot more libraries that aren't ready. Where as in closed source communities you only see libraries when they are ready.
Honestly though 0.4.x is stable on linux and I would use it. I'd still probably also use node.js as a load balancer in front of other node's rather then use nginx but that might be considered risky.
更多推荐
发布评论