]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: proxy: take the defsrv out of the struct proxy
authorWilly Tarreau <w@1wt.eu>
Thu, 10 Jul 2025 14:16:24 +0000 (16:16 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 15 Jul 2025 08:34:18 +0000 (10:34 +0200)
commit4ac28f07d0b2b6b0f970af8b5902ee48295ccb75
treed69670dade25b13db5ecab5355d4b3cb11216016
parent2414c5ce2f057bcfa10c7b76fa9444f648c37c2d
MEDIUM: proxy: take the defsrv out of the struct proxy

The server struct has gone huge over time (~3.8kB), and having a copy
of it in the defsrv section of the struct proxy costs a lot of RAM,
that is not needed anymore at run time.

This patch replaces this struct with a dynamically allocated one. The
field is allocated and initialized during alloc_new_proxy() and is
freed when the proxy is destroyed for now. But the goal will be to
support freeing it after parsing the section.
include/haproxy/proxy-t.h
src/http_client.c
src/proxy.c
src/server.c