]> git.ipfire.org Git - thirdparty/haproxy.git/commit
[MEDIUM] stream_sock: implement tcp-cork for use during shutdowns on Linux
authorWilly Tarreau <w@1wt.eu>
Sun, 14 Jun 2009 13:24:37 +0000 (15:24 +0200)
committerWilly Tarreau <w@1wt.eu>
Sun, 14 Jun 2009 13:24:37 +0000 (15:24 +0200)
commitfb14edc215d200c0857f098f2d339b504ff69095
treec82c0f4783ca6ba68043726dd77f6b03981dc3d1
parent9ea05a790f705620f442ba92889269582ffe8dbd
[MEDIUM] stream_sock: implement tcp-cork for use during shutdowns on Linux

Setting TCP_CORK on a socket before sending the last segment enables
automatic merging of this segment with the FIN from the shutdown()
call. Playing with TCP_CORK is not easy though as we have to track
the status of the TCP_NODELAY flag since both are mutually exclusive.
Doing so saves one more packet per session and offers about 5% more
performance.

There is no reason not to do it, so there is no associated option.
include/types/fd.h
src/backend.c
src/checks.c
src/client.c
src/proto_tcp.c
src/stream_sock.c