Configure TCP Keepalive
In this blueprint we aim to add configuration options to tune TCP keepalive. These will be used to enable/disable, and tune, TCP keepalive. To avoid socket leaks because of connections being left idle for any reason,the nova code has tcp keepalive automatically turned on in places like nova/wsgi.py and cinder/wsgi.py. However, there is no way to configure keepalive parameters.
nova.conf already has a tcp_keepidle setting. This is meant to be the the interval between the last data packet sent (excluding just ACKs) and the first keepalive probe; after the connection is marked to need keepalive, this counter is not used any further. In order to implement this blueprint I propose we specify the following configuration options:
* tcp_keepalive_
probes
* tcp_keepalive_
connection is considered dead
* tcp_keepalive_
tcp_keepalive. If this is False, default TCP values would be used.
This change will allow cluster owners to set tcp_keepidle, etc to values suitable for their setup, if they choose to do so. At present, this value defaults to 10 minutes (600 seconds), which is not necessarily good everywhere.
This was proposed in Nova, and it was suggested that its a better fit in Oslo.
https:/
Code changes will involve using socket.setsockopt() to set values specified in the conf.
There must be some documentation change to explain these settings as well.
References:
1. TCP Keepalive HOWTO http://
Blueprint information
Related branches
Related bugs
Sprints
Whiteboard
Gerrit topic: https:/
Addressed by: https:/
Enable configuring tcp keepalive