Skip to content

dnsdist: is my usage of newServer() correct or there is a better way? #13933

Answered by rgacogne
ousatov-ua asked this question in Q&A
Discussion options

You must be logged in to vote

It depends on how many CPU cores you want to dedicate to DNSdist, mostly. Every single newServer directive will start a new thread to deal with the responses from the Recursor, so starting 15 of them can use up to 15 CPU cores. For each directive there is only one socket between dnsdist and the recursor (so one <destination address, destination port, source address, source port> tuple).
If you instead use one newServer with sockets=16, for example, it will start only one thread to deal with incoming responses, but it will use 16 sockets between dnsdist and the Recursor. Increasing the number of sockets might make sense if you are enabling reuseport in the recursor configuration, because L…

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by ousatov-ua
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
2 participants