]> git.ipfire.org Git - thirdparty/haproxy.git/commit
[OPTIM] http: set MSG_MORE on response when a pipelined request is pending
authorWilly Tarreau <w@1wt.eu>
Sun, 3 Jan 2010 10:37:54 +0000 (11:37 +0100)
committerWilly Tarreau <w@1wt.eu>
Sun, 3 Jan 2010 10:37:54 +0000 (11:37 +0100)
commitface8392965c2bb93353ff31d16c15310ca499bf
tree4f08673ae554c7ec6c020b2beb4251d4c01cb8b7
parentd38b53b896aa5e6682cbd68ecf8df78a11169f02
[OPTIM] http: set MSG_MORE on response when a pipelined request is pending

Many times we see a lot of short responses in HTTP (typically 304 on a
reload). It is a waste of network bandwidth to send that many small packets
when we know we can merge them. When we know that another HTTP request is
following a response, we set BF_EXPECT_MORE on the response buffer, which
will turn MSG_MORE on exactly once. That way, multiple short responses can
leave pipelined if their corresponding requests were also pipelined.
include/types/buffers.h
src/proto_http.c
src/stream_sock.c