Why is there no heartbeat request?
Opened this issue · 2 comments
In Connection#isValid
, if the connection exceeds the maximum idle time, it will be closed. Why don't we provide a keep-alive heartbeat request? This would allow us to maintain a fixed-size connection pool for a longer period, avoiding the overhead and latency of rebuilding connections due to sudden traffic spikes.
The server employs TCP keep-alive to keep sockets active and detect dead sockets. At the time, it was decided that adding TCP keep-alive on the client was redundant. We are considering adding TCP keep-alive on the client in the future.
The server employs TCP keep-alive to keep sockets active and detect dead sockets. At the time, it was decided that adding TCP keep-alive on the client was redundant. We are considering adding TCP keep-alive on the client in the future.
Although TCP has a keep-alive mechanism, the connection may still be closed by the server if no requests are sent for a long time. If there is a heartbeat request, this issue will not occur
proto-fd-idle-ms=60000