Skip to content

net/http http2 reverse proxy connection pool #63112

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

Closed
Rohsichan opened this issue Sep 20, 2023 · 3 comments
Closed

net/http http2 reverse proxy connection pool #63112

Rohsichan opened this issue Sep 20, 2023 · 3 comments

Comments

@Rohsichan
Copy link

What version of Go are you using (go version)?

$ go version
go version go1.19.13 linux/amd64

Does this issue reproduce with the latest release?

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/root/.cache/go-build"
GOENV="/root/.config/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/root/go/pkg/mod"
GONOPROXY="git.monitorapp.com/aioncloud"
GONOSUMDB="git.monitorapp.com/aioncloud"
GOOS="linux"
GOPATH="/root/go"
GOPRIVATE="git.monitorapp.com/aioncloud"
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GOVCS=""
GOVERSION="go1.19.13"
GCCGO="gccgo"
GOAMD64="v1"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/root/wsp/src/AICWF10/go.mod"
GOWORK=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build2426452122=/tmp/go-build -gno-record-gcc-switches"

What did you do?

I am is httputil reverse proxy http2 use, client <- h2 -> proxy <- h2 -> server

transport config

   MaxIdleConns:        maxConns.MaxIdleConns,  // 1000
   MaxIdleConnsPerHost: maxConns.MaxIdleConnsPerHost, // 1000 
   IdleConnTimeout:     time.Minute * time.Duration(maxConns.IdleConnTimeout), // 10min

What did you expect to see?

Can't you make the server pool a transaction count in session?

What did you see instead?

I'm using http2. However, proxy <-> server and tcp are slow. A tcp retransmission occurs.
In this situation, only one http2 session is open.
Transaction is all locked. There is one server.
It becomes normal when connecting to the server without going through the proxy.
Can't you make the server pool a transaction count in session?
I checked with the netstat command and only use one tcp session.

@Rohsichan Rohsichan changed the title affected/package: affected/package: net/http http2 reverse proxy connection pool Sep 20, 2023
@Rohsichan
Copy link
Author

Additionally, more than 100 transactions are being processed in one session.

@Rohsichan Rohsichan changed the title affected/package: net/http http2 reverse proxy connection pool net/http http2 reverse proxy connection pool Sep 20, 2023
@seankhliao
Copy link
Member

it would be up to the client to open up multiple connections, the server has no control over this.

@seankhliao seankhliao closed this as not planned Won't fix, can't repro, duplicate, stale Sep 20, 2023
@Rohsichan
Copy link
Author

Go reverse proxy http2 is an issue that uses only one server and one tcp connection.
The client is the httputil reverse proxy.

@golang golang locked and limited conversation to collaborators Sep 19, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants