MINOR: listener: automatically adjust shards based on support for SO_REUSEPORT
authorWilly Tarreau <w@1wt.eu>
Sat, 22 Apr 2023 09:38:55 +0000 (11:38 +0200)
committerWilly Tarreau <w@1wt.eu>
Sun, 23 Apr 2023 07:46:15 +0000 (09:46 +0200)
commitc1fbdd6397010690b58786cbb561c9dfdb79e906
tree4a9b32d5583f2f735a1481d0309fe1f074beff89
parent785b89f5514082facf8b9061568460e9834f61d0
MINOR: listener: automatically adjust shards based on support for SO_REUSEPORT

Now if multiple shards are explicitly requested, and the listener's
protocol doesn't support SO_REUSEPORT, sharding is disabled, which will
result in the socket being automatically duped if needed. A warning is
emitted when this happens. If "shards by-group" or "shards by-thread"
are used, these will automatically be turned down to 1 since we want
this to be possible easily using -dR on the command line without having
to djust the config. For "by-thread", a diag warning will be emitted to
help troubleshoot possible performance issues.
doc/configuration.txt
src/listener.c