]> git.kaiwu.me - haproxy.git/commit
MEDIUM: proxy: implement purge backend
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Wed, 30 Sep 2026 12:41:45 +0000 (14:41 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Wed, 14 Oct 2026 09:33:41 +0000 (11:33 +0200)
commit0c6d8ee23fa5e3e10c743b914e8fb417e4fba8a0
treee5207932101e9356822026f81c4f8fff0cf10549
parent1525e169e4957edb73827b7e3f18f063038f1614
MEDIUM: proxy: implement purge backend

Add a new CLI command "purge backend", similar to "purge server". Its
objective is to remove a proxy instance at runtime, or if not possible
due to a transient error, flag the proxy for background deletion.

To implement it, a new flag PR_FL_TO_PURGE is defined. It is tested
inside proxy purge task to periodically test backend deletion via
be_check_for_deletion() until the operation can be completed.

Also, be_check_for_deletion() has been extended to add a pr_del_mode as
parameter. When using purge, backend server list can still be non empty,
at the condition that every entries in it are flagged for background
deletion as well.

A backend deletion can be cancelled by using publish/unpublish commands.
This will simply remove PR_FL_TO_PURGE and log a message to report the
cancellation.
doc/management.txt
include/haproxy/proxy-t.h
include/haproxy/proxy.h
src/cli.c
src/proxy.c