FreeBSD Manual Pages
COREDNS-MULTISOCKET(7) CoreDNS Plugins COREDNS-MULTISOCKET(7) NAME multisocket - allows to start multiple servers that will listen on one port. DESCRIPTION With multisocket, you can define the number of servers that will listen on the same port. The SO_REUSEPORT socket option allows to open multi- ple listening sockets at the same address and port. In this case, ker- nel distributes incoming connections between sockets. Enabling this option allows to start multiple servers, which increases the throughput of CoreDNS in environments with a large number of CPU cores. SYNTAX multisocket [NUM_SOCKETS] • NUM_SOCKETS - the number of servers that will listen on one port. Default value is equal to GOMAXPROCS. EXAMPLES Start 5 TCP/UDP servers on the same port. . { multisocket 5 forward . /etc/resolv.conf } Do not define NUM_SOCKETS, in this case it will take a value equal to GOMAXPROCS. . { multisocket forward . /etc/resolv.conf } RECOMMENDATIONS The tests of the multisocket plugin, which were conducted for NUM_SOCK- ETS from 1 to 10, did not reveal any side effects or performance degra- dation. This means that the multisocket plugin can be used with a default value that is equal to GOMAXPROCS. However, to achieve the best results, it is recommended to consider the specific environment and plugins used in CoreDNS. To determine the op- timal configuration, it is advisable to conduct performance tests with different NUM_SOCKETS, measuring Queries Per Second (QPS) and system load. If conducting such tests is difficult, follow these recommendations: 1. Determine the maximum CPU consumption of CoreDNS server without multi- socket plugin. Estimate how much CPU CoreDNS actually consumes in specific environment under maximum load. 2. Align NUM_SOCKETS with the estimated CPU usage and CPU limits or sys- tem's available resources. Examples: - If CoreDNS consumes 4 CPUs and 8 CPUs are available, set NUM_SOCK- ETS to 2. - If CoreDNS consumes 8 CPUs and 64 CPUs are available, set NUM_SOCKETS to 8. LIMITATIONS The SO_REUSEPORT socket option is not available for some operating sys- tems. It is available since Linux Kernel 3.9 and not available for Win- dows at all. Using this plugin with a system that does not support SO_REUSEPORT will cause an address already in use error. CoreDNS May 2025 COREDNS-MULTISOCKET(7)
NAME | DESCRIPTION | SYNTAX | EXAMPLES | RECOMMENDATIONS | LIMITATIONS
Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=coredns-multisocket&sektion=7&manpath=FreeBSD+Ports+15.0>
