]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: proxy: mark the "dispatch" directive as deprecated
authorWilly Tarreau <w@1wt.eu>
Thu, 26 Jun 2025 13:29:47 +0000 (15:29 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 26 Jun 2025 13:29:47 +0000 (15:29 +0200)
commit5c15ba5eff5f110a5151f04fa4ea7d196a0e2229
tree535152286978319d4769c29998dc1076f78e3e81
parent19140ca6669cbe452e5c0e657deb601bf5499de7
MEDIUM: proxy: mark the "dispatch" directive as deprecated

As mentioned in [1], the "dispatch" directive from haproxy 1.0 has long
outlived its original purpose and still suffers from a number of technical
limitations (no checks, no SSL, no idle connes etc) and still hinders some
internal evolutions. It's now time to mark it as deprecated, and to remove
it in 3.5 [2]. It was already recommended against in the documentation but
remained popular in raw TCP environments for being shorter to write.

The directive will now cause a warning to be emitted, suggesting an
alternate method involving "server". The warning can be shut using
"expose-deprecated-directives". The rare configs from 1.0 where
"dispatch" is combined with sticky servers using cookies will just
need to set these servers's weights to zero to prevent them from
being selected by the load balancing algorithm. All of this is
explained in the doc with examples.

Two reg tests were using this method, one purposely for this directive,
which now has expose-deprecated-directives, and another one to test the
behavior of idle connections, which was updated to use "server" and
extended to test both "http-reuse never" and "http-reuse always".

[1] https://github.com/orgs/haproxy/discussions/2921
[2] https://github.com/haproxy/wiki/wiki/Breaking-changes
doc/configuration.txt
reg-tests/connection/dispatch.vtc
reg-tests/connection/http_reuse_dispatch.vtc
src/cfgparse-listen.c