]> git.ipfire.org Git - thirdparty/pdns.git/commit
dnsdist: Use non-blocking pipes to pass DoH queries/responses around
authorRemi Gacogne <remi.gacogne@powerdns.com>
Mon, 8 Jun 2020 14:28:42 +0000 (16:28 +0200)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Mon, 8 Jun 2020 14:28:42 +0000 (16:28 +0200)
commit729801bc626dec3088690a5d0de4b805aa4a099e
tree6d89fba08867b96af713d56b32792404b7124e3a
parent07f37f2f9eb7ac50a4e4d3b93e1d19c75c82f90c
dnsdist: Use non-blocking pipes to pass DoH queries/responses around

This commit makes the internal sockets non-blocking so we don't freeze if
they ever fill up, and log errors/increment metrics instead.

It also replaces the socket pairs by pipes, since the default buffer
size for sockets seems to allow only ~278 pending queries which might
be reached given how libh2o batches events. On Linux, a pipe gives us
8192 pending queries by default due to the lower overhead, and it
can easily be incremented to 131072 pending queries by setting the
pipe size to 1048576. This commits adds a new setting to do just
that.
pdns/dnsdist-lua.cc
pdns/dnsdist-web.cc
pdns/dnsdist.cc
pdns/dnsdist.hh
pdns/dnsdistdist/docs/reference/config.rst
pdns/dnsdistdist/doh.cc
pdns/doh.hh