- nosplice
- nogetaddrinfo
- noreuseport
- - no-unused-socket
- spread-checks
- server-state-base
- server-state-file
Disables the use of SO_REUSEPORT - see socket(7). It is equivalent to the
command line argument "-dR".
-no-unused-socket
- By default, each haproxy process keeps all sockets opened, event those that
- are only used by another processes, so that any process can provide all the
- sockets, to make reloads seamless. This option disables this, and close all
- unused sockets, to save some file descriptors.
-
spread-checks <0..50, in percent>
Sometimes it is desirable to avoid sending agent and health checks to
servers at exact intervals, for instance when many logical servers are
goto out;
global.tune.options &= ~GTUNE_USE_REUSEPORT;
}
- else if (!strcmp(args[0], "no-unused-socket")) {
- if (alertif_too_many_args(0, file, linenum, args, &err_code))
- goto out;
- global.tune.options &= ~GTUNE_SOCKET_TRANSFER;
- }
else if (!strcmp(args[0], "quiet")) {
if (alertif_too_many_args(0, file, linenum, args, &err_code))
goto out;
#if defined(SO_REUSEPORT)
global.tune.options |= GTUNE_USE_REUSEPORT;
#endif
- global.tune.options |= GTUNE_SOCKET_TRANSFER;
pid = getpid();
progname = *argv;
exit(0); /* parent must leave */
}
+ /* pass through every cli socket, and check if it's bound to
+ * the current process and if it exposes listeners sockets.
+ * Caution: the GTUNE_SOCKET_TRANSFER is now set after the fork.
+ * */
+
+ if (global.stats_fe) {
+ struct bind_conf *bind_conf;
+
+ list_for_each_entry(bind_conf, &global.stats_fe->conf.bind, by_fe) {
+ if (bind_conf->level & ACCESS_FD_LISTENERS) {
+ if (!bind_conf->bind_proc || bind_conf->bind_proc & (1UL << proc)) {
+ global.tune.options |= GTUNE_SOCKET_TRANSFER;
+ break;
+ }
+ }
+ }
+ }
+
/* we might have to unbind some proxies from some processes */
px = proxy;
while (px != NULL) {