]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Rename the configuration option to load balance sockets to reuseport
authorOndřej Surý <ondrej@isc.org>
Wed, 6 Apr 2022 15:00:24 +0000 (17:00 +0200)
committerOndřej Surý <ondrej@isc.org>
Wed, 6 Apr 2022 15:03:57 +0000 (17:03 +0200)
After some back and forth, it was decidede to match the configuration
option with unbound ("so-reuseport"), PowerDNS ("reuseport") and/or
nginx ("reuseport").

CHANGES
bin/named/config.c
bin/named/named.conf.rst
bin/named/server.c
doc/arm/reference.rst
doc/man/named.conf.5in
doc/misc/options
doc/misc/options.active
doc/misc/options.grammar.rst
doc/notes/notes-current.rst
lib/isccfg/namedconf.c

diff --git a/CHANGES b/CHANGES
index 1dcc51a3bee3ebf26993b8bb770c011ccb1927ef..18d0aa9b077fc5bab3749d85eca3c194654843f2 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -2,8 +2,8 @@
                        crash if the connection to the first server was not
                        successful. [GL #3244]
 
-5852.  [func]          Add new "load-balance-socket" option to
-                       enable/disable load balancing of sockets. [GL #3249]
+5852.  [func]          Add new "reuseport" option to enable/disable load
+                       balancing of sockets. [GL #3249]
 
 5851.  [placeholder]
 
index e5599bc89c69de7122759d1e6998d6c81cffabae..7bf312261713674f8f3b69abf591f00b009fecdc 100644 (file)
@@ -70,15 +70,7 @@ options {\n\
        heartbeat-interval 60;\n\
        interface-interval 60;\n\
        listen-on {any;};\n\
-       listen-on-v6 {any;};\n"
-#if HAVE_SO_REUSEPORT_LB
-                           "\
-       load-balance-sockets yes;\n"
-#else
-                           "\
-       load-balance-sockets no;\n"
-#endif
-                           "\
+       listen-on-v6 {any;};\n\
 #      lock-file \"" NAMED_LOCALSTATEDIR "/run/named/named.lock\";\n\
        match-mapped-addresses no;\n\
        max-ixfr-ratio 100%;\n\
@@ -90,7 +82,15 @@ options {\n\
        nta-lifetime 3600;\n\
        nta-recheck 300;\n\
 #      pid-file \"" NAMED_LOCALSTATEDIR "/run/named/named.pid\"; \n\
-       port 53;\n\
+       port 53;\n"
+#if HAVE_SO_REUSEPORT_LB
+                           "\
+       reuseport yes;\n"
+#else
+                           "\
+       reuseport no;\n"
+#endif
+                           "\
        tls-port 853;\n"
 #if HAVE_LIBNGHTTP2
                            "\
index 6974439ec0b9249ea5de5ba49b4e5ad664f4e67a..0410dfca763ec7e7fc84e93b962f7e453e1892f9 100644 (file)
@@ -300,7 +300,6 @@ OPTIONS
            string ] {
            address_match_element; ... };
        lmdb-mapsize sizeval;
-       load-balance-sockets boolean;
        lock-file ( quoted_string | none );
        managed-keys-directory quoted_string;
        masterfile-format ( raw | text );
@@ -410,6 +409,7 @@ OPTIONS
            [ nsip-enable boolean ] [ nsdname-enable boolean ] [
            dnsrps-enable boolean ] [ dnsrps-options { unspecified-text
            } ];
+       reuseport boolean;
        root-delegation-only [ exclude { string; ... } ];
        root-key-sentinel boolean;
        rrset-order { [ class string ] [ type string ] [ name
index 949460e9dface713db6f1ff8e1110934b55489e1..dd2740f42d9701396ea1a1969fecd83ae4678a15 100644 (file)
@@ -8854,7 +8854,7 @@ load_configuration(const char *filename, named_server_t *server,
        ns_interfacemgr_setbacklog(server->interfacemgr, backlog);
 
        obj = NULL;
-       result = named_config_get(maps, "load-balance-sockets", &obj);
+       result = named_config_get(maps, "reuseport", &obj);
        INSIST(result == ISC_R_SUCCESS);
        loadbalancesockets = cfg_obj_asboolean(obj);
 #if HAVE_SO_REUSEPORT_LB
@@ -8864,14 +8864,12 @@ load_configuration(const char *filename, named_server_t *server,
        } else if (loadbalancesockets !=
                   isc_nm_getloadbalancesockets(named_g_netmgr)) {
                cfg_obj_log(obj, named_g_lctx, ISC_LOG_WARNING,
-                           "changing load-balance-sockets value requires "
-                           "server restart");
+                           "changing reuseport value requires server restart");
        }
 #else
        if (loadbalancesockets) {
-               cfg_obj_log(
-                       obj, named_g_lctx, ISC_LOG_WARNING,
-                       "load-balance-sockets has no effect on this system");
+               cfg_obj_log(obj, named_g_lctx, ISC_LOG_WARNING,
+                           "reuseport has no effect on this system");
        }
 #endif
 
index 1ac16f288234433ba53728b97e9225a72713dd9e..2807f01d0a3b75e451197ee3e442a0cddc842fea 100644 (file)
@@ -1726,17 +1726,16 @@ Boolean Options
    If ``yes``, respond to root key sentinel probes as described in
    draft-ietf-dnsop-kskroll-sentinel-08. The default is ``yes``.
 
-``load-balance-sockets``
-
+``reuseport``
    This option enables kernel load-balancing of sockets on systems which support
-   it, including Linux and FreeBSD. This instructs the kernel to distribute
-   incoming socket connections among the networking threads based on a hashing
-   scheme. For more information, see the receive network flow classification
-   options (``rx-flow-hash``) section in the ``ethtool`` manual page. The
-   default is ``yes``.
-
-   Enabling ``load-balance-sockets`` significantly increases general throughput
-   when incoming traffic is distributed uniformly onto the threads by the
+   it, including Linux (SO_REUSEPORT) and FreeBSD (SO_REUSEPORT_LB). This
+   instructs the kernel to distribute incoming socket connections among the
+   networking threads based on a hashing scheme. For more information, see the
+   receive network flow classification options (``rx-flow-hash``) section in the
+   ``ethtool`` manual page. The default is ``yes``.
+
+   Enabling ``reuseport`` significantly increases general throughput when
+   incoming traffic is distributed uniformly onto the threads by the
    operating system. However, in cases where a worker thread is busy with a
    long-lasting operation, such as processing a Response Policy Zone (RPZ) or
    Catalog Zone update or an unusually large zone transfer, incoming traffic
index a1b97c796004ef5f3af51219fcc7fc8ba7488d51..9b6f17eed9f68b3bf3919c8ef072e9a1a7924c27 100644 (file)
@@ -350,7 +350,6 @@ options {
           string ] {
           address_match_element; ... };
       lmdb\-mapsize sizeval;
-      load\-balance\-sockets boolean;
       lock\-file ( quoted_string | none );
       managed\-keys\-directory quoted_string;
       masterfile\-format ( raw | text );
@@ -460,6 +459,7 @@ options {
           [ nsip\-enable boolean ] [ nsdname\-enable boolean ] [
           dnsrps\-enable boolean ] [ dnsrps\-options { unspecified\-text
           } ];
+      reuseport boolean;
       root\-delegation\-only [ exclude { string; ... } ];
       root\-key\-sentinel boolean;
       rrset\-order { [ class string ] [ type string ] [ name
index ea1365633dcbfa4efee245319deac7af57f52560..ea30f3fa0f01a403b0176171028c8389adc36e73 100644 (file)
@@ -217,7 +217,6 @@ options {
             <string> ] {
             <address_match_element>; ... }; // may occur multiple times
         lmdb-mapsize <sizeval>;
-        load-balance-sockets <boolean>;
         lock-file ( <quoted_string> | none );
         managed-keys-directory <quoted_string>;
         masterfile-format ( raw | text );
@@ -328,6 +327,7 @@ options {
             [ nsip-enable <boolean> ] [ nsdname-enable <boolean> ] [
             dnsrps-enable <boolean> ] [ dnsrps-options { <unspecified-text>
             } ];
+        reuseport <boolean>;
         root-delegation-only [ exclude { <string>; ... } ];
         root-key-sentinel <boolean>;
         rrset-order { [ class <string> ] [ type <string> ] [ name
index 4aa8022ffa4d11e228f4b6e35124a63519de3c87..e93fb80a87e9054414bedfc25bd5c08c94f8a902 100644 (file)
@@ -215,7 +215,6 @@ options {
             <string> ] {
             <address_match_element>; ... }; // may occur multiple times
         lmdb-mapsize <sizeval>;
-        load-balance-sockets <boolean>;
         lock-file ( <quoted_string> | none );
         managed-keys-directory <quoted_string>;
         masterfile-format ( raw | text );
@@ -325,6 +324,7 @@ options {
             [ nsip-enable <boolean> ] [ nsdname-enable <boolean> ] [
             dnsrps-enable <boolean> ] [ dnsrps-options { <unspecified-text>
             } ];
+        reuseport <boolean>;
         root-delegation-only [ exclude { <string>; ... } ];
         root-key-sentinel <boolean>;
         rrset-order { [ class <string> ] [ type <string> ] [ name
index 858409aa25f5cc878186e139eacc4c37c7516882..155a27b92a11976464ea9638ab9db6d5238da6a2 100644 (file)
            <string> ] {
            <address_match_element>; ... };
        lmdb-mapsize <sizeval>;
-       load-balance-sockets <boolean>;
        lock-file ( <quoted_string> | none );
        managed-keys-directory <quoted_string>;
        masterfile-format ( raw | text );
            [ nsip-enable <boolean> ] [ nsdname-enable <boolean> ] [
            dnsrps-enable <boolean> ] [ dnsrps-options { <unspecified-text>
            } ];
+       reuseport <boolean>;
        root-delegation-only [ exclude { <string>; ... } ];
        root-key-sentinel <boolean>;
        rrset-order { [ class <string> ] [ type <string> ] [ name
index c211cfec7ad75f6340ae5a7164af35f47f911ca0..080008ad8760dff37005907bbf649131fa5c6029 100644 (file)
@@ -96,7 +96,7 @@ Feature Changes
   received over TCP has been dropped. Previously, it was capped at 23
   queries processed at the same time. :gl:`#3141`
 
-- Add a new configuration option ``load-balance-sockets`` to disable
+- Add a new configuration option ``reuseport`` to disable
   load balancing on sockets in scenarios in which processing of
   Response Policy Zones (RPZ), Catalog Zones, or large zone transfers
   can cause service disruptions. See the BIND 9 ARM for more detail.
index 1e7298c0da436964b58e1a611a0c840f8b5c21ab..e49bd7812ee55b7b62a1320f404b59b790953659 100644 (file)
@@ -1279,7 +1279,6 @@ static cfg_clausedef_t options_clauses[] = {
          CFG_CLAUSEFLAG_OBSOLETE },
        { "listen-on", &cfg_type_listenon, CFG_CLAUSEFLAG_MULTI },
        { "listen-on-v6", &cfg_type_listenon, CFG_CLAUSEFLAG_MULTI },
-       { "load-balance-sockets", &cfg_type_boolean, 0 },
        { "lock-file", &cfg_type_qstringornone, 0 },
        { "managed-keys-directory", &cfg_type_qstring, 0 },
        { "match-mapped-addresses", &cfg_type_boolean, 0 },
@@ -1309,6 +1308,7 @@ static cfg_clausedef_t options_clauses[] = {
        { "random-device", &cfg_type_qstringornone, 0 },
        { "recursing-file", &cfg_type_qstring, 0 },
        { "recursive-clients", &cfg_type_uint32, 0 },
+       { "reuseport", &cfg_type_boolean, 0 },
        { "reserved-sockets", &cfg_type_uint32, CFG_CLAUSEFLAG_DEPRECATED },
        { "secroots-file", &cfg_type_qstring, 0 },
        { "serial-queries", NULL, CFG_CLAUSEFLAG_ANCIENT },