]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: backend: support hash-key guid for a stabler distribution
authorWilly Tarreau <w@1wt.eu>
Tue, 19 May 2026 17:06:32 +0000 (19:06 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 19 May 2026 17:11:25 +0000 (19:11 +0200)
commit7004bb3b8c55bd901ef2e5032d77a105ec4256f5
tree2dc3eebef155e4a0fc3780826aab14ba18877bb6
parenta59e6e5efd01a30ed4b83310ca8ba127f56488d0
MINOR: backend: support hash-key guid for a stabler distribution

When server fleets are constantly updated, using a stable distribution
across a bunch of load balancers can be convenient. The addr and port
already provide a bit of this but for situations were addresses might
differ between sites or change dynamically this does not work. The guid
is perfect for this because by definition it's supposed to designate a
single server and be unique. So when two servers anywhere have the same,
the tool that provisionned them promises that they are the same server.

So here we introduce "hash-key guid" which performs a 32-bit hash on
the GUID value. When no guid is provided, a fallback is performed on
ID, as is done for other keys.
doc/configuration.txt
include/haproxy/server-t.h
src/lb_chash.c
src/server.c