Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why is there no heartbeat request? #362

Open
funky-eyes opened this issue Dec 10, 2024 · 2 comments
Open

Why is there no heartbeat request? #362

funky-eyes opened this issue Dec 10, 2024 · 2 comments

Comments

@funky-eyes
Copy link

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.

@BrianNichols
Copy link
Member

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.

@funky-eyes
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants