haproxy/doc
Willy Tarreau 5d0f5f8168 MINOR: mux-h2: assign a limited frames processing budget
This introduces 3 new settings: tune.h2.be.max-frames-at-once and
tune.h2.fe.max-frames-at-once, which limit the number of frames that
will be processed at once for backend and frontend side respectively,
and tune.h2.fe.max-rst-at-once which limits the number of RST_STREAM
frames processed at once on the frontend.

We can now yield when reading too many frames at once, which allows to
limit the latency caused by processing too many frames in large buffers.
However if we stop due to the RST budget being depleted, it's most likely
the sign of a protocol abuse, so we make the tasklet go to BULK since
the goal is to punish it.

By limiting the number of RST per loop to 1, the SSL response time drops
from 95ms to 1.6ms during an H2 RST flood attack, and the maximum SSL
connection rate drops from 35.5k to 28.0k instead of 11.8k. A moderate
SSL load that shows 1ms response time and 23kcps increases to 2ms with
15kcps versus 95ms and 800cps before. The average loop time goes down
from 270-280us to 160us, while still doubling the attack absorption
rate with the same CPU capacity.

This patch may usefully be backported to 3.3 and 3.2. Note that to be
effective, this relies on the following patches:

  MEDIUM: sched: do not run a same task multiple times in series
  MINOR: sched: do not requeue a tasklet into the current queue
  MINOR: sched: do not punish self-waking tasklets anymore
  MEDIUM: sched: do not punish self-waking tasklets if TASK_WOKEN_ANY
  MEDIUM: sched: change scheduler budgets to lower TL_BULK
2026-03-23 07:14:22 +01:00
..
design-thoughts CLEANUP: assorted typo fixes in the code and comments 2025-04-02 11:12:20 +02:00
internals DOC: internals: short explanation on how thread_exec_ctx works 2026-03-12 18:28:09 +01:00
lua-api CLEANUP: assorted typo fixes in the code, commits and doc 2025-07-10 19:49:48 +02:00
51Degrees-device-detection.txt DOC: 51d: updated 51Degrees repo URL for v3.2.10 2023-11-23 16:26:13 +01:00
acl.fig [DOC] add diagrams of queuing and future ACL design 2009-02-22 16:46:38 +01:00
coding-style.txt DOC: fix typos in the documentation files 2026-01-20 08:15:28 +01:00
configuration.txt MINOR: mux-h2: assign a limited frames processing budget 2026-03-23 07:14:22 +01:00
cookie-options.txt DOC: fix a few typos in the documentation 2018-11-18 22:23:15 +01:00
DeviceAtlas-device-detection.txt DOC: deviceatlas build clarifications 2025-07-03 09:08:06 +02:00
gpl.txt [LICENSE] licensing clarifications 2006-06-15 21:48:13 +02:00
haproxy.1 DOC: add description of pidfile in master-worker mode 2020-08-26 18:40:53 +02:00
HAProxyCommunityEdition_60px.png DOC: replace the README by a markdown version 2024-05-30 13:53:46 +02:00
haterm.txt MINOR: haterm: add long options for QUIC and TCP "bind" settings 2026-02-20 12:00:34 +01:00
intro.txt DOC: fix typos in the documentation files 2026-01-20 08:15:28 +01:00
lgpl.txt [LICENSE] licensing clarifications 2006-06-15 21:48:13 +02:00
linux-syn-cookies.txt DOC: add doc/linux-syn-cookies.txt 2015-08-11 12:17:41 +02:00
lua.txt [RELEASE] Released version 3.1-dev6 2024-08-21 17:50:03 +02:00
management.txt MINOR: memprof: also permit to sort output by calling context 2026-03-12 18:06:37 +01:00
netscaler-client-ip-insertion-protocol.txt DOC: fix typos 2019-05-25 07:34:24 +02:00
network-namespaces.txt MAJOR: namespace: add Linux network namespace support 2014-11-21 07:51:57 +01:00
peers-v2.0.txt MEDIUM: stick-tables: add a new stored type for glitch_cnt and glitch_rate 2024-02-08 15:51:49 +01:00
peers.txt CLEANUP: assorted typo fixes in the code and comments 2022-12-07 09:08:18 +01:00
proxy-protocol.txt DOC: proxy-proto: underline the packed attribute for struct pp2_tlv_ssl 2026-02-11 14:46:55 +01:00
queuing.fig [DOC] add diagrams of queuing and future ACL design 2009-02-22 16:46:38 +01:00
regression-testing.txt DOC: reg-tests: update VTest upstream link in the starting guide 2026-01-26 13:56:13 +01:00
seamless_reload.txt CLEANUP: removed obsolete examples an move a few to better places 2019-06-15 21:25:06 +02:00
SOCKS4.protocol.txt MEDIUM: connection: Upstream SOCKS4 proxy support 2019-05-31 17:24:06 +02:00
SPOE.txt CLEANUP: assorted typo fixes in the code, commits and doc 2025-04-03 11:37:25 +02:00
WURFL-device-detection.txt CONTRIB: move src/wurfl.c and contrib/wurfl to addons/wurfl 2021-04-02 17:48:42 +02:00