Closed valdemarpavesi closed 3 weeks ago
I have not tried this, but you could make a local modification and see if it would work. I think you would just need to change this line:
https://github.com/stmcginnis/gofish/blob/main/client.go#L503
Thanks @stmcginnis, yes it helps
transport
DisableKeepAlives: false
IdleConnTimeout: 1 * time.Minute
and
req.Close = false
req.Header.Add("Connection", "keep-alive")
vendor1 tcp fin/ack 11 times vendor2 tcp fin/ack 37
with req.Close = true
vendor1 tcp fin/ack 169 times vendor2 tcp fin/ack 37
vendor2 make no difference.
Thanks.
regards! Valdemar
Awesome - does this mean it works how you would like it to with that change? I'm wondering if we need to expose a config flag or something to make this easier. Or if there is value in trying to make this the default behavior.
Hello @stmcginnis Yes, if can expose it into the config will be better.
regards! Valdemar
If you're able to test with #351, that would be great to have someone else verify it improves things.
using context and setting IdleConnTimeout and DisableKeepAlives and req.Close = false
still release the TCP for every new request.
We wanna keep the same TCP connection Have you accomplished it?