]> git.kaiwu.me - haproxy.git/commit
MINOR: connection: add a function to calculate elastic streams limit
authorWilly Tarreau <w@1wt.eu>
Sat, 9 May 2026 14:37:25 +0000 (16:37 +0200)
committerWilly Tarreau <w@1wt.eu>
Sun, 10 May 2026 12:36:08 +0000 (14:36 +0200)
commitdd36c84a7b21fa86f8db57e3f832e3122a52aeef
tree0d0bb5edddf6d65abf9341aea27f94ec70047931
parent7f17512d18d8dd477edeb8daa246a4a2fddd66ea
MINOR: connection: add a function to calculate elastic streams limit

This adds a new tune.streams-elasticity parameter. This parameter
indicates, as a percentage, the average number of streams per connection
at full load. It is used to calculate limits of the number of streams to
advertise on new connections. 0 means that no such limit is set.

When a limit is set, the new function conn_calc_max_streams() determines
the optimal number of streams to allow on a connection. It will assign at
least the ratio of streams left to connections left, and at least a fair
share of what's left times the number of desired streams. It will always
ensure that each connection gets at least 1 stream, and everything beyond
this will be evenly distributed. For now the function is not used.
doc/configuration.txt
include/haproxy/connection.h
include/haproxy/global-t.h
src/cfgparse-global.c