]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: stream: Support dynamic changes of the number of connection retries
authorChristopher Faulet <cfaulet@haproxy.com>
Wed, 25 Sep 2024 13:10:08 +0000 (15:10 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Mon, 30 Sep 2024 14:55:53 +0000 (16:55 +0200)
commit6a94b7419eea9af5516c3fc80ea0ed705f4e0aea
treea10d766968bfc0d9297ec1002a1aef42eff60742
parent91e785edc92535af7797a82fe4ea9ce4973975d2
MINOR: stream: Support dynamic changes of the number of connection retries

Thanks to the previous patch, it is now possible to add an action to
dynamically change the maxumum number of connection retires for a stream.
"set-retries" action may now be used to do so, from a "tcp-request content"
or a "http-request" rule. This action accepts an expression or an integer
between 0 and 100. The integer value is checked during the configuration
parsing and leads to an error if it is not in the expected range. However,
for the expression, the value is retrieve at runtime. So, invalid value are
just ignored.

Too high value is forbidden to avoid any trouble. 100 retries seems already
be an amazingly hight value. In addition, the option is only available on
backend or listen sections.

Because the max retries is limited to 100 at most, it can be stored as a
unsigned short. This save some space in the stream structure.
doc/configuration.txt
include/haproxy/stream-t.h
src/stream.c