Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Unfair comparison of HTTPS (Go) vs HTTP (RUST) performance #331

Open
maxsharabayko opened this issue Dec 1, 2022 · 6 comments
Open

Unfair comparison of HTTPS (Go) vs HTTP (RUST) performance #331

maxsharabayko opened this issue Dec 1, 2022 · 6 comments

Comments

@maxsharabayko
Copy link

Seems like the Golang version of the HTTP-server problem (1-http2.go) spawns an HTTPS server (with TLS encryption), while the RUST version (1.rs) spawns a regular HTTP server (without encryption).
Hence the performance comparison is not fair.

@lohaswinner
Copy link

@lohaswinner
Copy link

lohaswinner commented Dec 1, 2022

@hanabi1224 Oh~ sorry. There is 1.go. But the representation is displayed by '1-m.go'.
I can't understand the layout translation.

@maxsharabayko There are HTTP-server 1.go. and HTTPS-server 1-http2.rs.
Though I can't understand well why HTTPS server by Golang is the fastest of the Input: 500, it's just a case of implementation by Golang.
Maybe, Golang uses the feature of HTTPS acceleration. (e.g. 0-RTT session resumption)

@hanabi1224
Copy link
Owner

hanabi1224 commented Dec 1, 2022

Though I can't understand well why HTTPS server by Golang is the fastest

It's http2 being faster not https.

Side note: http2 requires https in general, http2 over tcp aka h2c is not widely used or impelemented

Seems like the Golang version of the HTTP-server problem (1-http2.go) spawns an HTTPS server (with TLS encryption), while the RUST version (1.rs) spawns a regular HTTP server (without encryption).

http protocols are part of file name, why would you compare rust http/1.1 with go http/2?

@maxsharabayko
Copy link
Author

http protocols are part of file name, why would you compare rust http/1.1 with go http/2?

I was confused by the results on this page then:
https://programming-language-benchmarks.vercel.app/problem/http-server
Didn't think the problems being solved and presented in the same table are different.
Maybe worth separating HTTP1 and HTTP2 results or adding a tag?

@maxsharabayko
Copy link
Author

maxsharabayko commented Dec 1, 2022

BTW is there a problem statement for this test? I was thinking to add C++ implementation.
I wonder do I need the whole HTTP server (e.g. boost.beast) or simple HTTP request/response would be enough (then simply boost.asio).

@cyrusmsk
Copy link
Contributor

Some clarifications, restrictions and details about problem are required. Also not very clear why some solutions have "-m" and other have not.

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

No branches or pull requests

4 participants