-
Notifications
You must be signed in to change notification settings - Fork 643
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
HTTP response validation #239
Comments
@OvermindDL1 what do you think ? |
@waghanza That is only because it is not returning optional headers. I did not bother setting additional headers in it like the others that I saw, thus it is only returning HTTP Mandatory Headers. It's throughput is lower because it's overall requests/sec is significantly higher. I absolutely agree that the headers should be standardized as it should make the throughput match the requests/s at that point for all frameworks. I'm curious how go is showing higher requests/s than C++, I was not able to replicate that on my servers (I did not test Rust's actix). I'm wondering if it is due to the lower core count on the machine being tested, 4 cores is not very high (my testing server has 8 physical cores, 16 hyperthreads, AMD's new chip has 32 cores on a single chip, my big server, which is far too loaded down to do actual tests on sadly, has 16 physical xeon cores). |
@OvermindDL1 the question is more, which headers are required ? after answering this, we need to fix all suites / tests |
Well the HTTP spec itself doesn't mandate very many headers at all. Adding headers to most of them probably won't affect results any as they will likely still fit in a single packet anyway (so it would increase throughput without messing with reqs/sec much if at all). The list above is a good set to add anyway. Content-Length should be required regardless, chunking should not be used as they are empty/short bodies. However, adding a Date header should probably not be added. It is not required by the spec and many production web servers don't add it because it adds a syscall overhead to the requests, thus incurring serialization to the kernel and can SIGNIFICANTLY reduce overall performance. |
@greenlaw110 COULD date header been disabled on act ? |
Checkout this:
|
Indeed, if you don't put a Date then you must follow:
It's generally inferred that Date is required if you need that functionality, otherwise it is optional pursuant to the clock not available section. A quick test shows that the frameworks are sending a date already so it may just be a moot point, plus on modern linux's it doesn't require a syscall any longer anyway (it's in the kernel shared memory in modern versions), it was a bigger issue back in the day. |
@greenlaw110 @OvermindDL1 I think the For example, in the last version of this benchmark :
So, even if the language is the same, For me, we SHOULD keep the default version for each framework, without tweaking / optimizing |
That means What I want with this issue is to define the response specification for each test, and the specification should include BOTH header and body. Makes sense? |
Sure, but this was not the question here. The question IS :
I thin, NO. For me it's a framework feature. Like SO_REUSEPORT in @OvermindDL1 what do you think ? |
As we are talking about standard. Then I would say if framework's default behavior doesn't follow the standard, then the benchmark should regular the implementation to overwrite the default behavior. BTW, |
I understand your point of view. However, I think having a non-default implementations of each frameworks COULD lead to mis-understanding of results / false comparison. I mean, many developers use framework for what it is (default), and not tweaking to optimize throughput |
Many frameworks do default to different headers, but they are generally expected to be replaced by the application using them, they are just simple defaults to get running. Honestly it is probably fine to just leave them at defaults, focus on req/s that way (otherwise throughput is testing mismatched things, plus req/s and latency is what the client browser really cares about). As for |
OK for headers |
@OvermindDL1 I find an interested links https://github.com/vibora-io/benchmarks#infamous-hello-world |
An HTTP response should have at least the following headers:
The text was updated successfully, but these errors were encountered: