From: Willy Tarreau Date: Tue, 7 Sep 2021 08:49:45 +0000 (+0200) Subject: MINOR: proxy: add a global "grace" directive to postpone soft-stop X-Git-Tag: v2.5-dev7~35 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=10080716bfa76380a7b93c4d0ff4081301fada0c;p=thirdparty%2Fhaproxy.git MINOR: proxy: add a global "grace" directive to postpone soft-stop In ticket #1348 some users expressed some concerns regarding the removal of the "grace" directive from the proxies. Their use case very closely mimmicks the original intent of the grace keyword, which is, let haproxy accept traffic for some time when stopping, while indicating an external LB that it's stopping. This is implemented here by starting a task whose expiration triggers the soft-stop for real. The global "stopping" variable is immediately set however. For example, this below will be sufficient to instantly notify an external check on port 9999 that the service is going down, while other services remain active for 10s: global grace 10s frontend ext-check bind :9999 monitor-uri /ext-check monitor fail if { stopping } --- diff --git a/doc/configuration.txt b/doc/configuration.txt index 8981a6c77f..056bc1a385 100644 --- a/doc/configuration.txt +++ b/doc/configuration.txt @@ -994,6 +994,7 @@ The following keywords are supported in the "global" section : - expose-experimental-directives - external-check - gid + - grace - group - hard-stop-after - h1-case-adjust @@ -1309,6 +1310,52 @@ gid will only be able to drop these groups if started with superuser privileges. See also "group" and "uid". +grace