使用Node.js和PHP相比有什么优势 [英] What are the advantages of using Node.js vs PHP

查看:206
本文介绍了使用Node.js和PHP相比有什么优势的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

可能重复:
为什么以及何时使用节点js?

Possible Duplicate:
Why and When to use node js?

有人可以告诉我为什么对node.js如此大惊小怪吗?与用php框架编写的常规网站相比,用node.js编写的常规网站(让我们说一个博客)是否更快?我知道用node.js编写的Web服务器会比apache快,但是一个真正的不创建线程之类的Web应用程序呢?

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?

推荐答案

有2个主要优点:

  1. 速度! (性能)
  2. Node.js是事件驱动且无阻塞的,并且非常擅长处理并发请求.

这是链接在Apache上针对PHP测试node.js.

Here is a link to a benchmarking test for node.js against PHP on Apache.

这篇关于使用Node.js和PHP相比有什么优势的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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