Tuesday, August 7, 2012

HARDENING NODE.JS FOR PRODUCTION PART 2: USING NGINX TO AVOID NODE.JS LOAD

Method to load a Node.js site using nginx per the gist below. The blog post contains a full walk-through of the configuration. The config proxies the HTTP traffic from the Node processes, directly handles static files so that Express doesn't have to do it, uses the nginx built-in caching, and turns on gzip. All this could be done in Node/Express, but is going to be more efficient to let Nginx do it.

http://blog.argteam.com/coding/hardening-node-js-for-production-part-2-using-nginx-to-avoid-node-js-load/

https://gist.github.com/3072833

2 comments:

  1. Hi
    Nice article, I just found it via Twitter.
    I really like the principal, using each piece of software to it's strengths.
    Just wondering if you'd considered using try_files to determine "real" files in the FS rather than statically defining them (http://wiki.nginx.org/HttpCoreModule#try_files).
    Cheers
    Neil

    ReplyDelete
  2. I have just came to know basic idea of that Node.JS is being Software Application Development platform but not deeply.and I try to understand your post with example

    ReplyDelete