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

Gotling opening up new TCP connection for each request #19

Open
prashantgupta24 opened this issue Nov 6, 2020 · 1 comment
Open

Gotling opening up new TCP connection for each request #19

prashantgupta24 opened this issue Nov 6, 2020 · 1 comment

Comments

@prashantgupta24
Copy link

prashantgupta24 commented Nov 6, 2020

I am monitoring open connections made by gotling on nginx, and I saw that gotling opened a new connection for each request.

So for instance if I had 100 users, each with 10 iterations, gotling made a total of 1000 new TCP connections to nginx.

I'm not sure if this was the intended behavior, but I did some research, and by moving the code below in httpreq.go to outside the function DoHttpRequest (basically making it a global variable):

var DefaultTransport http.RoundTripper = &http.Transport{
	TLSClientConfig: &tls.Config{InsecureSkipVerify: true},
}

reduced the number of new TCP connections.

My guess is that gotling started utilizing persistent connections after this change?

Love to hear your thoughts on this.

@eriklupander
Copy link
Owner

eriklupander commented Apr 15, 2021

Hi, sorry I havn't gotten back to you regarding your question.

If I remember correctly: When I originally developed Gotling I used it to load-test an environment set up behind a Zuul Edge Server in a Docker Swarm based landscape. I vaguely recall that I had to deliberately disable HTTP keep-alives i Gotling in order for Docker Swarm to properly load-balance requests amongst targeted containers.

I guess this is something that one should consider making configurable on a "per-action" or possibly "per suite" in the yaml.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants