carlos8f / buffet

Performance-oriented static file server
http://carlos8f.github.com/node-buffet
190 stars 12 forks source link

nginx vs buffet? #12

Closed disfated closed 11 years ago

disfated commented 11 years ago

Why there are no nginx benches? I've tested it and it turns out that nginx is amazingly fast: ~19K rps compared to ~6K rps on buffet (over clean http). Another interesting thing is why node can't reach nginx speeds? As far as I know, 6K (some average machine) is almost maximum you can squeeze out from node. Did you discovered - are there ways to boost node's http? What's the weakest link? Thanks for the great project!

carlos8f commented 11 years ago

There are nginx benches, but it's disabled out of the box since it requires setup.

On my machine (recent-ish iMac) nginx is indeed faster, but not by as much as your result:

https://gist.github.com/carlos8f/6584020

In my experience node slows down:

Also nginx is a ridiculously optimized and focused piece of software, so it's doubtful node will ever equal its speed. But node is interpreted so you trade some speed for being able to endlessly tweak its behavior through js.