]> git.ipfire.org Git - thirdparty/haproxy.git/commit
OPTIM/MEDIUM: stream_interface: add a new SI_FL_NOHALF flag
authorWilly Tarreau <w@1wt.eu>
Sun, 13 May 2012 12:48:59 +0000 (14:48 +0200)
committerWilly Tarreau <w@1wt.eu>
Sun, 13 May 2012 12:52:22 +0000 (14:52 +0200)
commit7bb68abb9f40b570af946de674e4ce9401f7945c
treebfebaea1e5c7bfd867d48ad9800889b1fa812970
parentdbcd47ea354e7741035fad9219120a1eeaa1d038
OPTIM/MEDIUM: stream_interface: add a new SI_FL_NOHALF flag

This flag indicates that we're not interested in keeping half-open
connections on a stream interface. It has the benefit of allowing
the socket layer to cause an immediate write close when detecting
an incoming read close. This releases resources much faster and
saves one syscall (either a shutdown or setsockopt).

This flag is only set by HTTP on the interface going to the server
since we don't want to continue pushing data there when it has
closed.

Another benefit is that it responds with a FIN to a server's FIN
instead of responding with an RST as it used to, which is much
cleaner.

Performance gains of 7.5% have been measured on HTTP connection
rate on empty objects.
include/types/stream_interface.h
src/proto_http.c
src/session.c
src/sock_raw.c