Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add to fastify benchmarks #5

Open
styfle opened this issue Mar 2, 2018 · 11 comments
Open

Add to fastify benchmarks #5

styfle opened this issue Mar 2, 2018 · 11 comments

Comments

@styfle
Copy link

styfle commented Mar 2, 2018

There are a bunch of http libs that claim to be fast.
And there is a benchmark to see who is fastest.

You should add turbo-http to the benchmarks repo and see how it measures up 😄
https://github.com/fastify/benchmarks

@mhart
Copy link

mhart commented Mar 3, 2018

I don't think this is really relevant – this module is a level below a web framework – it's essentially a replacement for require('http').createServer()... but even simpler than that. It's possible the frameworks listed there could run on this instead of the built-in node.js http module, but I imagine that's not necessarily its goal.

@styfle
Copy link
Author

styfle commented Mar 3, 2018

Good point!

Maybe this quote from the readme could show the source code for the benchmark and test harness to produce the results. For example, is this one test run or an average of 50 test runs?

On my laptop I can serve simple hello world payloads at around 100k requests/seconds compared to 10k requests/second using node core.

@lukeed
Copy link

lukeed commented Mar 3, 2018

Not relevant. This is a HTTP server, as opposed to a server framework. Aka, this replaces require('http') but does not replace require('express').

@styfle
Copy link
Author

styfle commented Mar 5, 2018

Looks like someone went ahead and did it anyway: fastify/benchmarks#47

@tuananh
Copy link

tuananh commented Mar 5, 2018

@lukeed so sth like this should qualify? https://github.com/emkay/theodore

@lukeed
Copy link

lukeed commented Mar 5, 2018

@tuananh The framework, yes. But only when it's running on require('http'). The suite is benchmarking frameworks and framework overheads, not HTTP servers.

@lukeed
Copy link

lukeed commented Mar 5, 2018

Otherwise things like fasthttp would start showing up in the Fastify benchmark (which would be meaningless).

@tuananh
Copy link

tuananh commented Mar 5, 2018

@lukeed I get your point. I just don't understand why using http core module is a must when comparing, as long as it's a web framework. never mind.

@lukeed
Copy link

lukeed commented Mar 5, 2018

Because that's the most common module. Most people are using it, and all existing benchmark tests are already running with it. Turbo, UWS, etc are all upgrades. AKA, it's like showing up to a high school baseball game on a double dose of steroids -- it isn't fair.

Best to benchmark on native / "raw" because it's already the baseline. Then let people upgrade to their preferred HTTP alternative if/when they want to. Also, when you make that upgrade, you're upgrading the server and not the framework.

@styfle
Copy link
Author

styfle commented Jul 9, 2018

I understand now that it doesn't make sense to compare with fastify.
But it would make sense to compare with other HTTP frameworks.

@mafintosh How about adding it to https://www.techempower.com/benchmarks/ so that it can be compared to the node.js core http module and many other web frameworks?

@aichholzer
Copy link
Contributor

See this.
Disclaimer: Although I am 100% with @lukeed on this one (and we've had this very conversation elsewhere on Github), some people might still find it nice and useful to be able to see some numbers.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants