]> git.kaiwu.me - haproxy.git/commit
MINOR: config: add a "worker-id" global keyword to identify the worker
authorWilly Tarreau <w@1wt.eu>
Tue, 15 Sep 2026 11:46:53 +0000 (13:46 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 16 Sep 2026 16:00:51 +0000 (18:00 +0200)
commit3639aac31f726a6195bba6dc16d4efb539452bd2
treee0b70d2440f5cc1c50cfa9409b23600e37f35263
parentfbe37fa504b54f1bda9a05bf022c102b74244aab
MINOR: config: add a "worker-id" global keyword to identify the worker

The worker process now also has a unique identifier. Contrary to the
master's one, it may be replaced using the new "worker-id" keyword in
the global section. Like for the master, a time-ordered UUID (version 7)
is generated at boot (allowing to compare older vs newer process).

The identifier is immediately exported as HAPROXY_WORKER_ID so that it
may be referenced from the worker's configuration and be inherited by
the processes we may fork (e.g. external checks). It may even be
referenced by the worker-id directive itself to combine a static part
with the dynamically generated one.
doc/configuration.txt
include/haproxy/global-t.h
src/cfgparse-global.c
src/haproxy.c