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

net/http: tls with large number of connections #16878

Closed
stomir opened this issue Aug 25, 2016 · 2 comments

Comments

Projects
None yet
3 participants
@stomir
Copy link

commented Aug 25, 2016

Please answer these questions before submitting your issue. Thanks!

  1. What version of Go are you using (go version)?
    go version go1.7 linux/amd64
  2. What operating system and processor architecture are you using (go env)?
    go version go1.7 linux/amd64
  3. What did you do?
    Start a HTTPS server with ListenAndServeTLS
  4. What did you expect to see?
    Handling a lot of short connections
  5. What did you see instead?
    Not handling a lot of short connections

So basically, the TLS handler is bad at handling large number of short connections,
and works a lot better when I removed the "tcpKeepAliveListener" from this line:
tlsListener := tls.NewListener(tcpKeepAliveListener{ln.(*net.TCPListener)}, config)

(I disabled KeepAlives with SetKeepAlivesEnabled anyway)

@stomir stomir changed the title net/http net/http: tls with large number of connections Aug 25, 2016

@quentinmit

This comment has been minimized.

Copy link
Contributor

commented Aug 25, 2016

I'm afraid we need more information. Can you write a simple benchmark that demonstrates the problem and show how much faster it gets with the change you propose?

@stomir

This comment has been minimized.

Copy link
Author

commented Aug 25, 2016

ok, this is pretty embarrassing

When I was working on the problem, at some point I was forced to update go version on the machine I was working on, and that was what actually helped me.
So this was probably some already resolved problem with handling cryptography in only one thread.
Sorry for wasting your time.

@stomir stomir closed this Aug 25, 2016

@golang golang locked and limited conversation to collaborators Aug 25, 2017

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.