Closed shiw13 closed 2 hours ago
很好的建议。我们后续会考虑一下这个需求。谢谢。
问题
本地测试 http 1.1 转发,发现bfe貌似会一直保持和后端服务之间的tcp连接,每条连接会占用2条协程,导致空闲后 协程也还在。
解决方案
bfe能否支持配置 空闲连接超时时间,超时后自动断开。也就是标准库里面的 http.Transport IdleConnTimeout
// IdleConnTimeout is the maximum amount of time an idle // (keep-alive) connection will remain idle before closing // itself. // Zero means no limit.
是否可以补充下测试方法;另外测试中是否开启了连接池
问题
本地测试 http 1.1 转发,发现bfe貌似会一直保持和后端服务之间的tcp连接,每条连接会占用2条协程,导致空闲后 协程也还在。
解决方案
bfe能否支持配置 空闲连接超时时间,超时后自动断开。也就是标准库里面的 http.Transport IdleConnTimeout