0

I mostly write web apps using Python MVC frameworks which are run on top of nginx. It's simple and it works. Nginx is pretty fast and Python is a joy to work with.

What exactly can I benefit from switching over to Node? Is there any specific job that Node is best suited for? From what I've seen it's a just cool single-threaded non-blocking process that does the job of both the server and your coding language in one. Javascript is cool too.

Where does Node really shine--if it does that at all?

Would I really be able to handle a lot more requests had I written my web app in node instead of a python mvc + nginx? And will those individual requests be fast as well (without much lag)?

TheOne
  • 10,819
  • 20
  • 81
  • 119
  • related: http://stackoverflow.com/questions/5062614/how-to-decide-when-to-use-nodejs?rq=1 – TheOne Dec 30 '13 at 02:36
  • 1
    Node shines in real-time applications, and the huge stack of tools/libraries that were developed for that regard. Other than that, python+mvc framework is just as fine (and more than fine, in your case, since you know it well) – verybadalloc Dec 30 '13 at 02:43

1 Answers1

1

nginx / apache:

upon getting a request:
    start a process to run it (apache maintains a pool)
    call io (file / database / external web service etc.) synchronously 
                                                   (block wait for a response)

node.js / Tornado:

upon getting a request:
    use current single thread process to run it (ignoring cluster for simplicity)
    use async programming for io calls

given the above, node will perform better in an io intensive applications, but may become irresponsive in a cpu intensive ones.

Guy Gavriely
  • 11,228
  • 6
  • 27
  • 42