Closed Felixoid closed 4 years ago
I'm testing it right now. Even with timeout 1ns the connection reuse is significant, but it's recreated eventually, so the load balancing is much better.
I implemented it differently. Check it, please
https://github.com/lomik/carbon-clickhouse/commit/56fceb969ddb283838d9aa4b4c55fc7e9bbef9e7
It's fine, but http.Client still defined for each upload. Don't you think it's more optimal to define it once?
upd: I'm not sure if disabling KeepAlive solves the problem, btw
Yes, 56fceb9 works. I still have little doubts regarding http.Client declaration in upload, but disabling keep-alive works perfectly
Use a new connection each POST for balancing the load over CH nodes under an LB.
Closes #52