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

Make rustls as a default (or perhaps drop native-tls) #331

Closed
hatoo opened this issue Oct 11, 2023 · 0 comments
Closed

Make rustls as a default (or perhaps drop native-tls) #331

hatoo opened this issue Oct 11, 2023 · 0 comments

Comments

@hatoo
Copy link
Owner

hatoo commented Oct 11, 2023

native-tls block when calling https://docs.rs/tokio-native-tls/latest/tokio_native_tls/native_tls/struct.TlsConnectorBuilder.html#method.build

Sometimes this leads to a problem

❯ cargo run --release -- -n 1 -c 10 --http2 --insecure --no-tui  https://localhost:8090/
   Compiling oha v0.6.5 (/home/hatoo/oha)
    Finished release [optimized] target(s) in 6.67s
     Running `target/release/oha -n 1 -c 10 --http2 --insecure --no-tui 'https://localhost:8090/'`
Summary:
  Success rate: 100.00%
  Total:        2.7290 secs # <- too long

Whereas rustls works well

❯ cargo run --no-default-features --features rustls  --release -- -n 1 -c 10 --http2 --insecure --no-tui  https://localhost:8090/
   Compiling oha v0.6.5 (/home/hatoo/oha)
    Finished release [optimized] target(s) in 6.81s
     Running `target/release/oha -n 1 -c 10 --http2 --insecure --no-tui 'https://localhost:8090/'`
Summary:
  Success rate: 100.00%
  Total:        0.0086 secs

We can mitigate this by playing with tokio but ... I don't want to.

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

1 participant