Open
Description
What version of Go are you using (go version
)?
$ go version go version go1.16.6 darwin/amd64
Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (go env
)?
go env
Output
$ go env GO111MODULE="on" GOARCH="amd64" GOBIN="" GOCACHE="/Users/neko/Library/Caches/go-build" GOENV="/Users/neko/Library/Application Support/go/env" GOEXE="" GOFLAGS="" GOHOSTARCH="amd64" GOHOSTOS="darwin" GOINSECURE="" GOMODCACHE="/Users/neko/golang/pkg/mod" GONOPROXY="github.com/nekomoewww/harmony" GONOSUMDB="github.com/nekomoewww/harmony" GOOS="darwin" GOPATH="/Users/neko/golang" GOPRIVATE="github.com/nekomoewww/harmony" GOPROXY="https://goproxy.cn,https://gocenter.io,https://goproxy.io,direct" GOROOT="/usr/local/go" GOSUMDB="sum.golang.org" GOTMPDIR="" GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64" GOVCS="" GOVERSION="go1.16.6" GCCGO="gccgo" AR="ar" CC="clang" CXX="clang++" CGO_ENABLED="1" GOMOD="/Users/neko/golang/work/missevan-go/go.mod" CGO_CFLAGS="-g -O2" CGO_CPPFLAGS="" CGO_CXXFLAGS="-g -O2" CGO_FFLAGS="-g -O2" CGO_LDFLAGS="-g -O2" PKG_CONFIG="pkg-config" GOGCCFLAGS="-fPIC -arch x86_64 -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/m0/k_38ftb53yg0mqbcrrjypr3m0000gn/T/go-build4128625603=/tmp/go-build -gno-record-gcc-switches -fno-common"
What did you do?
Used default http2.Transport{}
and set to a http.Client.Transport
, and established many connections to the http2 server.
What did you expect to see?
There are two different problems we are expecting to improve:
- We shouldn't establish more connections when it reaches a limitation.
http2.Transport
needs to export aMaxConcurrentStreams
field to achieve this - If one connection pipeline encountered an error, we should break all the connections in the same pool and try to start over again.
http.Client
orhttp2.Transport
needs to export some error indication fields to achieve this.
What did you see instead?
- We cannot retrieve connection when timeout, it will result in an error which we cannot control at all. (Example error:
context deadline exceeded (Client.Timeout exceeded while awaiting headers)
) - There are no exported fields to adjust connection limitations
- If one connection pipeline encountered an error, it hangs over and we lost control of it