{"action":"created","issue":{"url":"https://api.github.com/repos/golang/go/issues/13957","labels_url":"https://api.github.com/repos/golang/go/issues/13957/labels{/name}","comments_url":"https://api.github.com/repos/golang/go/issues/13957/comments","events_url":"https://api.github.com/repos/golang/go/issues/13957/events","html_url":"https://github.com/golang/go/issues/13957","id":126724467,"number":13957,"title":"net/http: limit Transport per-host connections in-flight, close unwanted ones","user":{"login":"trajber","id":291612,"avatar_url":"https://avatars.githubusercontent.com/u/291612?v=3","gravatar_id":"","url":"https://api.github.com/users/trajber","html_url":"https://github.com/trajber","followers_url":"https://api.github.com/users/trajber/followers","following_url":"https://api.github.com/users/trajber/following{/other_user}","gists_url":"https://api.github.com/users/trajber/gists{/gist_id}","starred_url":"https://api.github.com/users/trajber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trajber/subscriptions","organizations_url":"https://api.github.com/users/trajber/orgs","repos_url":"https://api.github.com/users/trajber/repos","events_url":"https://api.github.com/users/trajber/events{/privacy}","received_events_url":"https://api.github.com/users/trajber/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"bradfitz","id":2621,"avatar_url":"https://avatars.githubusercontent.com/u/2621?v=3","gravatar_id":"","url":"https://api.github.com/users/bradfitz","html_url":"https://github.com/bradfitz","followers_url":"https://api.github.com/users/bradfitz/followers","following_url":"https://api.github.com/users/bradfitz/following{/other_user}","gists_url":"https://api.github.com/users/bradfitz/gists{/gist_id}","starred_url":"https://api.github.com/users/bradfitz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bradfitz/subscriptions","organizations_url":"https://api.github.com/users/bradfitz/orgs","repos_url":"https://api.github.com/users/bradfitz/repos","events_url":"https://api.github.com/users/bradfitz/events{/privacy}","received_events_url":"https://api.github.com/users/bradfitz/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/golang/go/milestones/24","html_url":"https://github.com/golang/go/milestones/Go1.6","labels_url":"https://api.github.com/repos/golang/go/milestones/24/labels","id":1096159,"number":24,"title":"Go1.6","description":"","creator":{"login":"josharian","id":67496,"avatar_url":"https://avatars.githubusercontent.com/u/67496?v=3","gravatar_id":"","url":"https://api.github.com/users/josharian","html_url":"https://github.com/josharian","followers_url":"https://api.github.com/users/josharian/followers","following_url":"https://api.github.com/users/josharian/following{/other_user}","gists_url":"https://api.github.com/users/josharian/gists{/gist_id}","starred_url":"https://api.github.com/users/josharian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/josharian/subscriptions","organizations_url":"https://api.github.com/users/josharian/orgs","repos_url":"https://api.github.com/users/josharian/repos","events_url":"https://api.github.com/users/josharian/events{/privacy}","received_events_url":"https://api.github.com/users/josharian/received_events","type":"User","site_admin":false},"open_issues":18,"closed_issues":603,"state":"open","created_at":"2015-05-05T02:39:06Z","updated_at":"2016-01-14T19:49:22Z","due_on":"2016-01-31T08:00:00Z","closed_at":null},"comments":4,"created_at":"2016-01-14T19:07:16Z","updated_at":"2016-01-14T20:50:15Z","closed_at":null,"body":"As far as I know, http2 clients multiplex multiple requests on the same http2 connection.\r\nTo test this scenario I created a simple http2 client and server (listed bellow) using go1.6-beta2.\r\nThe server handler prints the request.RemoteAddr to ensure that the client is using the same host:port. Until then everything seemed to work properly because all log messages prints the same host and port.\r\nBut when I capture the network packets (or just run netstat) I see different client ports in use. The client does not seem multiplexing on the same TCP socket.\r\n\r\nI don't know if I'm missing something or if this is a real issue.\r\n\r\nClient - http://play.golang.org/p/oKBRCXGbOL\r\nServer - http://play.golang.org/p/AmG6J9qRBv\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/golang/go/issues/comments/171775422","html_url":"https://github.com/golang/go/issues/13957#issuecomment-171775422","issue_url":"https://api.github.com/repos/golang/go/issues/13957","id":171775422,"user":{"login":"trajber","id":291612,"avatar_url":"https://avatars.githubusercontent.com/u/291612?v=3","gravatar_id":"","url":"https://api.github.com/users/trajber","html_url":"https://github.com/trajber","followers_url":"https://api.github.com/users/trajber/followers","following_url":"https://api.github.com/users/trajber/following{/other_user}","gists_url":"https://api.github.com/users/trajber/gists{/gist_id}","starred_url":"https://api.github.com/users/trajber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trajber/subscriptions","organizations_url":"https://api.github.com/users/trajber/orgs","repos_url":"https://api.github.com/users/trajber/repos","events_url":"https://api.github.com/users/trajber/events{/privacy}","received_events_url":"https://api.github.com/users/trajber/received_events","type":"User","site_admin":false},"created_at":"2016-01-14T20:50:15Z","updated_at":"2016-01-14T20:50:15Z","body":"In some situations we do know if the peer supports http2.\r\nWhat if http.Transport had an attribute to always bound max conns at 1 (your second solution)? It will be used when we know that the server supports http2.\r\nIn other situations the http.Transport tries to discover what the peer supports.\r\n"}}