]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: tcp: implement tcp-ut bind option to set TCP_USER_TIMEOUT
authorWilly Tarreau <w@1wt.eu>
Tue, 3 Feb 2015 23:45:58 +0000 (00:45 +0100)
committerWilly Tarreau <w@1wt.eu>
Tue, 3 Feb 2015 23:54:40 +0000 (00:54 +0100)
commit2af207a5f5e8532ba8b9933cd60a87c33094be35
tree03cdbe7ec879687fbbd377eb374d810ea146bf12
parent51a1cf6bb4161977dba02d6d82bbfb750035890e
MEDIUM: tcp: implement tcp-ut bind option to set TCP_USER_TIMEOUT

On Linux since 2.6.37, it's possible to set the socket timeout for
pending outgoing data, with an accuracy of 1 millisecond. This is
pretty handy to deal with dead connections to clients and or servers.

For now we only implement it on the frontend side (bind line) so
that when a client disappears from the net, we're able to quickly
get rid of its connection and possibly release a server connection.
This can be useful with long-lived connections where an application
level timeout is not suited because long pauses are expected (remote
terminals, connection pools, etc).

Thanks to Thijs Houtenbos and John Eckersberg for the suggestion.
doc/configuration.txt
include/types/listener.h
src/proto_tcp.c