]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: proxy: no longer allocate the default-server entry by default
authorWilly Tarreau <w@1wt.eu>
Fri, 11 Jul 2025 06:40:17 +0000 (08:40 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 15 Jul 2025 08:39:44 +0000 (10:39 +0200)
commit49a619acae49321681b8e1b2b42d480a6a75ef46
treea9e173876fa16c55eab495943cde54cec2101955
parent76828d4120c9b6f4cad75d84f201e5dd5b023be4
MEDIUM: proxy: no longer allocate the default-server entry by default

The default-server entry used to always be allocated. Now we'll postpone
its allocation for the first time we need it, i.e. during a "default-server"
directive, or when inheriting a defaults section which has one. The memory
savings are significant, on a large configuration with 100k backends and
no default-server directive, the memory usage dropped from 800MB RSS to
420MB (380 MB saved). It should be possible to also address configs using
default-server by releasing this entry when leaving the proxy section,
which is not done yet.
src/proxy.c