Hacker News new | ask | show | jobs
by nailer 3818 days ago
It's not so much a matter of 'better' vs 'worse' as a balance between complexity and speed. node has very fast IO - that's what it's known for - and unlike Python or Ruby it can handle static files at speed: http://i.stack.imgur.com/amngX.png (from the second post at http://stackoverflow.com/questions/9967887/node-js-itself-or... which provides some excellent discussion). nginx is faster, but small projects that don't need load balancing may benefit from having less software to install.

As the article mentions, you'll probably want a load balancer for high availability. Whether you use haproxy or nginx for that is a whole different discussion.

1 comments

Faster than Ruby or Python doesn't mean anything if it's objectively slow. And it is. I've only been able to serve a small handful of concurrent users at a time with Express. I'm talking 5 or 6 before things get out of hand.

You should aim to have the bulk of your payload be static, and all of the static payload be served by apache or nginx. It's the difference between getting good feedback from a Show HN post or completely missing out and looking like a fool.

> I've only been able to serve a small handful of concurrent users at a time with Express.

Something's massively wrong with your node setup. node won't be as fast, but it should be on the same order of magnitude as nginx: https://github.com/observing/balancerbattle (or any other benchmark)