]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: config: restrict shards, not bind_conf to one group each
authorWilly Tarreau <w@1wt.eu>
Fri, 3 Feb 2023 14:52:07 +0000 (15:52 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 3 Feb 2023 17:00:21 +0000 (18:00 +0100)
commit50440457e3aeee92a51df484465a880ed3a83c8c
treea00ce0de5f7a2719e17d11b456f53460084e2787
parent484093df805400222ac795eba21128df2e1a0228
MEDIUM: config: restrict shards, not bind_conf to one group each

Now that we're using thread_sets there's no need to restrict an entire
bind_conf to 1 group, the real concern being the FD, we can move that
restriction to the shard only. This means that as long as we have enough
shards and that they're properly aligned on group boundaries (i.e. shards
are an integer divider of the number of threads), we can support "bind"
lines spanning more than one group.

The check is still performed for shards to span more than one group,
and an error is emitted when this happens. But at least now it becomes
possible to have this:

    global
       nbthread 256

    frontend foo
       bind :1111 shards 4
       bind :2222 shards by-thread
src/cfgparse.c