80

Possible Duplicate:
Why and When to use 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?

7
  • 4
    @Rahul: Node.js is server-side Javascript: nodejs.org Commented Apr 11, 2011 at 14:00
  • 2
    @Rahul Node.js is server-side JavaScript. Commented Apr 11, 2011 at 14:00
  • 5
    @Rahul — JavaScript is "a programming language" not "an exclusively client side programming language". Node.js is not designed to run inside web browsers. Commented Apr 11, 2011 at 14:00
  • 3
    @rahul node.js is server side framework! Commented Apr 11, 2011 at 14:00
  • 3
    @RahulChordiya Ditto what everyone said. Haha. Commented Apr 23, 2012 at 10:41

1 Answer 1

55

Edited:

There are 2 main advantages:

  1. Speed! (Performance)
  2. Node.js is event-driven and non-blocking and very good at handling concurrent requests.

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

Sign up to request clarification or add additional context in comments.

19 Comments

yes i know that node.js web server is faster than apache :) so it is only the web server advantage?
I'd say the main advantage is memory usage. If you do long-polling stuff node.js shines since it doesn't require a 100 MB Apache + PHP instance to handle each request. So if you do anything where you have many connections open at the same time - for long periods of time - go with node.js. Usually they coexist well. use node.js for updating a chat panel or similar, not to render your pages.
You forgot to mention one of the most important features: it's non-blocking!
A port of WordPress to Node.js would be awesome. hah
@trusktr tryghost.org
|

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.