3 ms·
You'd think. Write a web server in C and a web server in python/erlang/go/node.js. You'll notice that the one written in C (or C++) runs twice as fast. If it w
by halayli 14y ago
You'd think.
Write a web server in C and a web server in python/erlang/go/node.js. You'll notice that the one written in C (or C++) runs twice as fast. If it was a syscall bottleneck then they'd achieve the same performance.
zero-copy request handling is not possible in high level languages without hacking.
For a quick test, run httperf against the dumbest node.js web server that returns 204.
Then run the same test against an nginx server that does nothing but return a 204
location / {
return 204;
}
Compare the difference.