Hacker News new | past | comments | ask | show | jobs | submit login

Express supports sendfile(), so it should be about as efficient as any other Web server. I wonder if anybody has benchmarked it.



Nginx has a lot of tricks to handle this for you, including caching and working over multiple cores. There is also less framework overhead in Nginx because it's not trying to do dynamic content. I'd be surprised if Node beats Nginx for serving static content, but alas I do not have any proof. At the very least it will use time in Node that is better off serving dynamic content.


Hmm, web servers differ dramatically is serving single files.

The approach I favour is to put varnish in front of a classic slow script webserver (tornado, but use node if you prefer).

Tornado has this neat way of baking-in versioning to static content so clients (and proxies) can do aggressive caching http://www.tornadoweb.org/documentation/overview.html#static...

Best of both worlds.


I'm curious, is that an asynchronous sendfile?


Yes.


as in spinning off a thread to serve it?




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

Search: