3 ms·
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.c
by benologist 15y 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-10-performance-tips-linkedin-mobile http://engineering.linkedin.com/nodejs/blazing-fast-nodejs-1...
- deleted 15y ago[deleted]
- 1SaltwaterC 15y agoBesides 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 https://github.com/ry/nginx-ey-balancer) it is doable.