使用 Node.js 与 PHP 的优势是什么
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/5622335/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
What are the advantages of using Node.js vs PHP
提问by overthetop
Possible Duplicate:
Why and When to use node js?
可能的重复:
为什么以及何时使用 node js?
Can someone tell me why all this fuss about node.js ? Is a regular web site (lets say a blog) written in node.js faster compared to same written in some php framework? I know that a web server written in node.js will be faster than apache but how about a real web application that doesn't create threads or something like that?
有人能告诉我为什么对 node.js 这么大惊小怪吗?与用某些 php 框架编写的网站相比,用 node.js 编写的常规网站(比如博客)是否更快?我知道用 node.js 编写的 web 服务器会比 apache 快,但是一个真正的 web 应用程序不创建线程或类似的东西呢?
采纳答案by Robin Maben
Edited:
编辑:
There are 2 main advantages:
有2个主要优点:
- Speed! (Performance)
- Node.js is event-driven and non-blocking and very good at handling concurrent requests.
- 速度!(表现)
- Node.js 是事件驱动和非阻塞的,非常擅长处理并发请求。
Here is a linkto a benchmarking test for node.js against PHP on Apache.
这是针对 Apache 上的 PHP 的 node.js 基准测试的链接。