Called when there is data read. If you use the buffer outside of this function
you should copy it.
req.onend()
Called when the request is fully read.
Benchmarks
Comparing turbo-http to other frameworks is like comparing oranges to apples.
turbo-http could be thought of as a replacement of Node's native http module, while all available frameworks actually use it.
Benchmark it:
clone this repo,
npm i
npm run bench
Benchmark averages are taken after one warm-up round.
Requests/s
Latency
Throughput/Mb
turbo-http.js
32592
3.03
2.43
bare-node.js
18396
5.32
1.98
rayo.js
16249.6
6.03
1.77
polka.js
15802.4
6.2
1.71
fastify.js
15141.6
6.47
2.26
express.js
13408.8
7.31
1.46
Note: Nevermind these numbers, this benchmark was run on a slow computer and the above table is for illustrative purposes only.
Optionally, you may also define your test's parameters: