-
Notifications
You must be signed in to change notification settings - Fork 548
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
Enable keep alive on tcp connections via feature #886
Conversation
f20d756
to
7f51639
Compare
Thanks for this!
Is there any reason to limit it to |
It is unclear how user will use regular connection and whether he wants to use keep-alive.
Yes, in similar manner it can be enabled for sync clients. If you prefer to feature gate the whole keep-alive on all connections, then I'll do it for all connections |
I refactored PR to hide |
I think it sounds like a good approach! |
Sorry for the delay, but one more request: Can we enable the feature by default? |
not for this PR, in order not to block it, but we should probably also use this in sync connections, not only in async. |
@nihohit Sorry I'm not sure I follow your last comment. |
This enables keep alive on tcp sockets via keep-alive feature.
This enables keep alive on tcp sockets via keep-alive feature.
This enables keep alive on tcp sockets via
keep-alive
featureDo you want to have it configurable so that onlyConnectionManager
would enable it?There is no harm in enabling it for short living connections as default intervals are quite long
Note that this doesn't really fix anything, but for long living connections it will speed up failure detection
Related to #885
Unfortunate sad state of rust networking
Just for reference redis(server) default value for keep-alive is 300 seconds (Ref)