:program:`dnsdist` design choices mean that the processing of UDP queries is done by only one thread per local bind.
This is great to keep lock contention to a low level, but might not be optimal for setups using a lot of processing power, caused for example by a large number of complicated rules.
-To be able to use more CPU cores for UDP queries processing, it is possible to use the ``reuseport`` parameter of the :func:`addLocal` and :func:`setLocal` directives to be able to add several identical local binds to dnsdist::
+To be able to use more CPU cores for UDP queries processing, it is possible to use the ``reusePort`` parameter of the :func:`addLocal` and :func:`setLocal` directives to be able to add several identical local binds to dnsdist::
- addLocal("192.0.2.1:53", {reuseport=true})
- addLocal("192.0.2.1:53", {reuseport=true})
- addLocal("192.0.2.1:53", {reuseport=true})
- addLocal("192.0.2.1:53", {reuseport=true})
+ addLocal("192.0.2.1:53", {reusePort=true})
+ addLocal("192.0.2.1:53", {reusePort=true})
+ addLocal("192.0.2.1:53", {reusePort=true})
+ addLocal("192.0.2.1:53", {reusePort=true})
:program:`dnsdist` will then add four identical local binds as if they were different IPs or ports, start four threads to handle incoming queries and let the kernel load balance those randomly to the threads, thus using four CPU cores for rules processing.
Note that this require ``SO_REUSEPORT`` support in the underlying operating system (added for example in Linux 3.9).