Closed szagi3891 closed 8 years ago
You must use siege because tokio-minihttp response HTTP 1.1 but ab use HTTP 1.0 (and he is waiting when socket will have closed)
@szagi3891 you need to enable keep-alive support in your ab benchmark:
ab -k -n 100 -c 10 http://127.0.0.1:8080/
@ademonov are you tested this? For me keep-alive didn't help me here.
@stalkerg, I have tested this in windows environment only. It is the only http 1.1 compatible benchmark I found, which works in windows environment
@ademonov ok, I will test it again
Thanks for the report, and sorry for the delay in responding! I think that this may actually be a bug in ab as I've seen historical reports mentioning this as well. This create also recently underwent some changes so I believe this is taken care of now.
I'm going to close this but if it still crops up please let me know!
Unfortunately there was an error in the compilation :
grzegorz@grzegorz:~/Pulpit/rust/test_http_futures$ cargo run --example static
Compiling tokio-minihttp v0.1.0 (https://github.com/tokio-rs/tokio-minihttp#9647d992)
error[E0432]: unresolved import `tokio_core::easy::EasyBuf`
--> /home/grzegorz/.cargo/git/checkouts/tokio-minihttp-cf614aa2e575fe98/master/src/request.rs:4:24
|
4 | use tokio_core::easy::{EasyBuf, Parse};
| ^^^^^^^ Could not find `easy` in `tokio_core`
error[E0432]: unresolved import `tokio_core::easy::Parse`
--> /home/grzegorz/.cargo/git/checkouts/tokio-minihttp-cf614aa2e575fe98/master/src/request.rs:4:33
|
4 | use tokio_core::easy::{EasyBuf, Parse};
| ^^^^^ Could not find `easy` in `tokio_core`
error[E0432]: unresolved import `tokio_core::easy::Serialize`
--> /home/grzegorz/.cargo/git/checkouts/tokio-minihttp-cf614aa2e575fe98/master/src/response.rs:3:5
|
3 | use tokio_core::easy::Serialize;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ Could not find `easy` in `tokio_core`
error[E0432]: unresolved import `tokio_core::easy::EasyFramed`
--> /home/grzegorz/.cargo/git/checkouts/tokio-minihttp-cf614aa2e575fe98/master/src/lib.rs:24:5
|
24 | use tokio_core::easy::EasyFramed;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Could not find `easy` in `tokio_core`
error: cannot continue compilation due to previous error
error: Could not compile `tokio-minihttp`.
To learn more, run the command again with --verbose.
grzegorz@grzegorz:~/Pulpit/rust/test_http_futures$
Ah yeah right now this relies on an unpublished version of tokio-core, but you can use that with a [replace]
section like this -- https://github.com/tokio-rs/tokio-minihttp/blob/master/Cargo.toml#L21-L22
Thanks it helped me. But what about HTTP 1.0 support?
I have this code :
When I run ab :
Out from server :
It seems that the server can not handle another request in the same connection.
help please :)