3 ms·
Node.js is not the thing to compare C web servers performance to. Like, it's so much not the thing, it goes beyond funny and wraps around to sad. Let me refer
by aasasd 8y ago
Node.js is not the thing to compare C web servers performance to. Like, it's so much not the thing, it goes beyond funny and wraps around to sad.
Let me refer you to the TechEmpower framework benchmarks: https://www.techempower.com/benchmarks/#section=data-r17&hw=ph&test=plaintext https://www.techempower.com/benchmarks/#section=data-r17&hw=...
Look at the language column there, you'll be surprised.
- geocar 8y agoHere's fasthttp running on my machine (best of three): $ wrk -t2 -c90 -d9s http://localhost:8080/plaintext Running 9s test @ http://localhost:8080/plaintext 2 threads and 90 connections Thread Stats Avg Stdev Max +/- Stdev Latency 831.78us 364.48us 7.56ms 70.19% Req/Sec 40.55k 3.31k 48.04k 74.44% 726417 requests in 9.01s, 87.98MB read Requests/sec: 80603.64 Transfer/sec: 9.76MB which I got by checking out https://github.com/TechEmpower/FrameworkBenchmarks.git https://github.com/TechEmpower/FrameworkBenchmarks.git, disabling the mysql connection, and running frameworks/Go/fasthttp's ./server-mysql (which is what the benchmark script seems to do). I thought this would be easier than getting dash running the TechEmpower results. and here's dash running with the kdb networking disabled (best of three): $ wrk -t2 -c90 -d3s 'http://127.0.0.1:8080/?f=204&k=hi&v=1' Running 3s test @ http://127.0.0.1:8080/?f=204&k=hi&v=1 2 threads and 90 connections Thread Stats Avg Stdev Max +/- Stdev Latency 787.72us 213.62us 3.49ms 71.85% Req/Sec 44.82k 3.04k 60.44k 83.61% 271946 requests in 3.10s, 16.08MB read Requests/sec: 87671.23 Transfer/sec: 5.18MB My laptop isn't a beefy "Dell R440 Xeon Gold + 10 GbE" -- this is just a loopback test, but it's already disinclined me to spend any more time on it; Fasthttp definitely is impressive how close it gets, but dash is still faster. And comparing a 100 line C program to hundreds or thousands of lines of go or C or Java is a bit pointless. If the 100 lines of C doesn't do what you want, I'll throw it away and write a different 100 lines. That's what brief programs get you. NB: I would have tried ulib but it wouldn't even build on my laptop.