There are three reasons:
This is also a duplicate of #296.
@SergioBenitez I totally agree with you about your points to not add Rocket to TechEmpower benchmark. But, I did implemented as a Rust/Rocket learning process.
It would be great if you could check it out and give some advices. Thanks!
https://github.com/TechEmpower/FrameworkBenchmarks/pull/3996
Would you guys please have a look at this thread at DevTalk, especially OvermindDL1's comment.
@DevotionGeo
Second of all, last I checked the rocket.rs code it’s using is forcing each request to come as a new tcp connection, which will significantly make it ‘look’ slower than most other libraries (the fact its even still as fast as it is, is quite impressive though). To simulate more ‘actual’ web usage all testing should be done with new tcp connections each time though.
This sounds to me like the change in https://github.com/TechEmpower/FrameworkBenchmarks/pull/5296 to disable keep_alive. The implementation of keep_alive in either hyper 0.10 (the underlying http library), or rocket 0.4, or both, seems to be buggy, but it is not a problem for all benchmarks and deployment setups. I don't know if this change is reflected in the latest TechEmpower results, but I do remember that before that change there was a very high error rate in the benchmark for rocket. I expect the async migration (#1065), coming in rocket 0.5, to fix all of these and several other issues at the connection level because it includes an update to hyper 0.13 - which is mentioned in that thread as well:
Third, the rocket.rs version they are using is still using the old version of hyper pre-async, which though still fast is not anywhere near as fast as modern hyper (which is used by the nightly version of rocket, which is the one most people use of rocket anyway until the next big release).
Finishing and testing async and other 0.5 work is currently my top priority for Rocket. I am interested updating the benchmark to use rocket 0.5 once released, if nobody beats me to it. At the same time, I plan to make any changes if necessary to ensure that it looks like an "idiomatic" rocket application and doesn't have any undue performance issues stemming from the particular implementation.
@jebrosen
Thank you for the great work you do!
Most helpful comment
@DevotionGeo
This sounds to me like the change in https://github.com/TechEmpower/FrameworkBenchmarks/pull/5296 to disable
keep_alive. The implementation ofkeep_alivein eitherhyper 0.10(the underlying http library), orrocket 0.4, or both, seems to be buggy, but it is not a problem for all benchmarks and deployment setups. I don't know if this change is reflected in the latest TechEmpower results, but I do remember that before that change there was a very high error rate in the benchmark forrocket. I expect theasyncmigration (#1065), coming inrocket 0.5, to fix all of these and several other issues at the connection level because it includes an update tohyper 0.13- which is mentioned in that thread as well:Finishing and testing
asyncand other 0.5 work is currently my top priority for Rocket. I am interested updating the benchmark to use rocket 0.5 once released, if nobody beats me to it. At the same time, I plan to make any changes if necessary to ensure that it looks like an "idiomatic" rocket application and doesn't have any undue performance issues stemming from the particular implementation.