lua-resty-upstream-healthcheck icon indicating copy to clipboard operation
lua-resty-upstream-healthcheck copied to clipboard

Why not setkeepalive on tcp socket ?

Open NicoAdrian opened this issue 2 years ago • 1 comments

For each healthcheck, you seem to close the socket, why not put it into the connection pool with sock:setkeepalive() instead ?

https://github.com/openresty/lua-resty-upstream-healthcheck/blob/346f3a642b6717a26382e4032160aa766af0188c/lib/resty/upstream/healthcheck.lua#L275

NicoAdrian avatar Jun 13 '22 08:06 NicoAdrian

the healthcheck.lua does not parse the full http response, maybe there are some data left in the socket. So we can not put it into the pool

zhuizhuhaomeng avatar Jul 02 '22 02:07 zhuizhuhaomeng