]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: mux-h2: perform a graceful close at 75% glitches threshold
authorWilly Tarreau <w@1wt.eu>
Sat, 20 Dec 2025 17:53:08 +0000 (18:53 +0100)
committerWilly Tarreau <w@1wt.eu>
Sat, 20 Dec 2025 18:26:29 +0000 (19:26 +0100)
commit0901f60cefe6e4a67b9063ad9d97a83c0814b783
tree5064b5a811e253102e1da6f9506d752a58179aa7
parent52adeef7e154f7fc9401c923517051c3ff6282fd
MINOR: mux-h2: perform a graceful close at 75% glitches threshold

This avoids hitting the hard wall for connections with non-compliant
peers that would be accumulating errors over long connections. We now
permit to recycle the connection early enough to reset the connection
counter.

This was tested artificially by adding this to h2c_frt_handle_headers():

  h2c_report_glitch(h2c, 1, "new stream");

or this to h2_detach():

  h2c_report_glitch(h2c, 1, "detaching");

and injecting using h2load -c 1 -n 1000 0:4445 on a config featuring
tune.h2.fe.glitches-threshold 1000:

  finished in 8.74ms, 85802.54 req/s, 686.62MB/s
  requests: 1000 total, 751 started, 751 done, 750 succeeded, 250 failed, 250 errored, 0 timeout
  status codes: 750 2xx, 0 3xx, 0 4xx, 0 5xx
  traffic: 6.00MB (6293303) total, 132.57KB (135750) headers (space savings 29.84%), 5.86MB (6144000) data
                       min         max         mean         sd        +/- sd
  time for request:        9us       178us        10us         6us    99.47%
  time for connect:      139us       139us       139us         0us   100.00%
  time to 1st byte:      339us       339us       339us         0us   100.00%
  req/s           :   87477.70    87477.70    87477.70        0.00   100.00%

The failures are due to h2load not supporting reconnection.
doc/configuration.txt
src/mux_h2.c