Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

node.js isn't really that fast for traditional apps, but if you were to compare, it's pretty much on levels of nginx and it's actually slower serving static files. only in few cases node.js shows its power, i.e; real-time apps/games. i wouldn't build any full-blown websites in node.js. only a certain piece on the site i'd do it in node, like a widget or something.


Yep, you shouldn't be using node to serve static files anyway. This is something a reverse proxy such as nginx should do. Node can then be used to serve either as a pure API (serving json with express is the easiest way) for a webapp or render the webpages.


nginx is not a bad choice, but would instead recommend node-http-proxy for most projects (including production).

It's fast, easy to setup (npm install), and relatively hardened, while still keeping everything JS.

As for static assets, those should probably be served from a CDN anyway, if one is concerned with performance.


I agree about the CDN, even though for us performance is not so critical we need to use a CDN (yet). I didn't know node-http-proxy but it sounds interesting I'll check it out.


I agree. I would do the same but I couldn't find any examples of doing this on the web. One could potentially use Redis or a AMQP as a middleman to integrate node.js's push with a Rails app. If I get sometime on the weekend I would like to try this.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: