Skip to content

x/net/http2: implementation issue #48111

Open
@nekomeowww

Description

@nekomeowww

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:

  1. We shouldn't establish more connections when it reaches a limitation. http2.Transport needs to export a MaxConcurrentStreams field to achieve this
  2. 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 or http2.Transport needs to export some error indication fields to achieve this.

What did you see instead?

  1. 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))
  2. There are no exported fields to adjust connection limitations
  3. If one connection pipeline encountered an error, it hangs over and we lost control of it

Metadata

Metadata

Assignees

No one assigned

    Labels

    NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions