]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: h3: allocate small buffers for headers frames
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Wed, 14 Aug 2024 09:07:44 +0000 (11:07 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Tue, 20 Aug 2024 16:12:27 +0000 (18:12 +0200)
commitb355e89bf9cfc0c0ae4fffdc033bb59ea75a37c0
tree64446757ade82055655f8bdef78dad550c052d35
parent885e4c5cf81bc2435c6b46c957acba7eb5e72a07
MEDIUM: h3: allocate small buffers for headers frames

A major change was recently implemented to change QUIC MUX Tx buffer
allocation limit, which is now based on the current connection
congestion window size. As this size may be smaller than the previous
static value, it is likely that the limit will be reached more
frequently.

When using HTTP/3, the majority of requests streams are used for small
object exchanges. Every responses start with a HEADERS frames which
should be much smaller in size than the default buffer. But as the whole
buffer size is accounted against the congestion window, a single stream
can block others even if only emitting a single HEADERS frame which is
suboptimal for bandwith usage, if the congestion window is small enough.

To adapt to this new situation, rely on the newly available small
buffers to transfer HEADERS frame response. This at least guarantee that
several parallel streams could allocate their own buffer for the first
part of the response, even with a small congestion window.

The situation could be further improve to use various indication on the
data size and select a small buffer if sufficient. This could be done
for example via the Content-length value or HTX extra field. However
this must be the subject of a dedicated patch.
src/h3.c