-
Type: Improvement
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Networking
-
Minor Change
-
Platforms 2017-09-11
The server currently enables SO_KEEPALIVE on sockets whenever it is defined. On Linux it goes the extra mile and attempts to set a reasonable value for TCP_KEEPIDLE and TCP_KEEPINTVL (the default TCP_KEEPIDLE value on Linux - and keep-alive timeout on Windows - is a completely useless 7200 seconds).
The server should attempt to set a reasonable value for TCP_KEEPIDLE and TCP_KEEPINTVL whenever they are defined, not just on Linux. It should also attempt to set the equivalent values on Windows using WSAIoctl.
References:
https://github.com/mongodb/mongo/blob/master/src/mongo/util/net/sock.cpp#L153-L193
http://www.tldp.org/HOWTO/html_single/TCP-Keepalive-HOWTO/#setsockopt
https://msdn.microsoft.com/en-us/library/windows/desktop/dd877220(v=vs.85).aspx
- is related to
-
DRIVERS-383 Enable and configure TCP Keepalive by default
- Closed
-
SERVER-29359 Enable SO_KEEPALIVE on egress server connections
- Closed