Hacker News new | ask | show | jobs
by benologist 5193 days ago
You could put nginx in front of nodejs and let it handle the static files, it's far better at it.

This is worth reading as well: http://engineering.linkedin.com/nodejs/blazing-fast-nodejs-1...

1 comments

Besides that, node can listen on UNIX domain socket, while nginx can proxy the connection over UDS, therefore people can avoid the TCP stack. That should also shave off some latency. It may throw some 502 errors if is not configured properly, but with sysctl tricks or Ryan's patch for nginx (https://github.com/ry/nginx-ey-balancer) it is doable.